Loading nixos/modules/tasks/auto-upgrade.nix +18 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,15 @@ in ''; }; runGarbageCollection = lib.mkOption { type = lib.types.bool; default = false; description = '' Whether to automatically run `nix-gc.service` after a successful system upgrade. ''; }; }; }; Loading @@ -197,6 +206,12 @@ in The options 'system.autoUpgrade.channel' and 'system.autoUpgrade.flake' cannot both be set. ''; } { assertion = (cfg.runGarbageCollection -> config.nix.enable); message = '' The option 'system.autoUpgrade.runGarbageCollection = true' requires 'nix.enable = true'. ''; } ]; system.autoUpgrade.flags = ( Loading @@ -218,6 +233,9 @@ in restartIfChanged = false; unitConfig.X-StopOnRemoval = false; unitConfig.OnSuccess = lib.optional ( cfg.runGarbageCollection && config.nix.enable ) "nix-gc.service"; serviceConfig.Type = "oneshot"; Loading Loading
nixos/modules/tasks/auto-upgrade.nix +18 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,15 @@ in ''; }; runGarbageCollection = lib.mkOption { type = lib.types.bool; default = false; description = '' Whether to automatically run `nix-gc.service` after a successful system upgrade. ''; }; }; }; Loading @@ -197,6 +206,12 @@ in The options 'system.autoUpgrade.channel' and 'system.autoUpgrade.flake' cannot both be set. ''; } { assertion = (cfg.runGarbageCollection -> config.nix.enable); message = '' The option 'system.autoUpgrade.runGarbageCollection = true' requires 'nix.enable = true'. ''; } ]; system.autoUpgrade.flags = ( Loading @@ -218,6 +233,9 @@ in restartIfChanged = false; unitConfig.X-StopOnRemoval = false; unitConfig.OnSuccess = lib.optional ( cfg.runGarbageCollection && config.nix.enable ) "nix-gc.service"; serviceConfig.Type = "oneshot"; Loading