nixos/auto-upgrade: enable service only when it's enabled in options (#56948)
* nixos/auto-upgrade: enable service only when it's enabled in options This reduced closure size of `tinyContainer` from 449 MB to 403 MB
This commit is contained in:
parent
502a4263a3
commit
af5909a272
1 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ let cfg = config.system.autoUpgrade; in
|
|||
|
||||
};
|
||||
|
||||
config = {
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
system.autoUpgrade.flags =
|
||||
[ "--no-build-output" ]
|
||||
|
@ -84,7 +84,7 @@ let cfg = config.system.autoUpgrade; in
|
|||
${config.system.build.nixos-rebuild}/bin/nixos-rebuild switch ${toString cfg.flags}
|
||||
'';
|
||||
|
||||
startAt = optional cfg.enable cfg.dates;
|
||||
startAt = cfg.dates;
|
||||
};
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue