From b706037a60acc727f1b5c037e84dc61a35ef1db1 Mon Sep 17 00:00:00 2001 From: Aguirre Matteo <158215792+aguirre-matteo@users.noreply.github.com> Date: Fri, 9 May 2025 13:33:12 +0000 Subject: [PATCH] distrobox: make systemd unit optional (#7007) This PR adds an option enableSystemdUnit to the Distrobox module to make the Systemd Unit optional, and hard coded as is now. --- modules/programs/distrobox.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/programs/distrobox.nix b/modules/programs/distrobox.nix index 722129f2..990c682a 100644 --- a/modules/programs/distrobox.nix +++ b/modules/programs/distrobox.nix @@ -21,9 +21,16 @@ in options.programs.distrobox = { enable = mkEnableOption "distrobox"; - package = mkPackageOption pkgs "distrobox" { }; - + enableSystemdUnit = mkOption { + type = lib.types.bool; + default = true; + example = false; + description = '' + Whatever to enable a Systemd Unit that automatically rebuilds your + containers when changes are detected. + ''; + }; containers = mkOption { type = formatter.type; default = { }; @@ -77,7 +84,7 @@ in formatter.generate "containers.ini" cfg.containers ); - systemd.user.services.distrobox-home-manager = { + systemd.user.services.distrobox-home-manager = mkIf cfg.enableSystemdUnit { Unit.Description = "Build the containers declared in ~/.config/distrobox/containers.ini"; Install.WantedBy = [ "default.target" ];