diff options
author | Danylo Hlynskyi <abcz2.uprola@gmail.com> | 2019-03-07 02:09:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-07 02:09:02 +0200 |
commit | af5909a27258322eba8e207c2aca68c877020ef8 (patch) | |
tree | ac3d5ad6b71043ebcbe1cf1977acfa13b009546a | |
parent | 502a4263a34a2a2e870c04b9e34ee23d05fa66cd (diff) | |
download | nixpkgs-af5909a27258322eba8e207c2aca68c877020ef8.tar nixpkgs-af5909a27258322eba8e207c2aca68c877020ef8.tar.gz nixpkgs-af5909a27258322eba8e207c2aca68c877020ef8.tar.bz2 nixpkgs-af5909a27258322eba8e207c2aca68c877020ef8.tar.lz nixpkgs-af5909a27258322eba8e207c2aca68c877020ef8.tar.xz nixpkgs-af5909a27258322eba8e207c2aca68c877020ef8.tar.zst nixpkgs-af5909a27258322eba8e207c2aca68c877020ef8.zip |
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
-rw-r--r-- | nixos/modules/tasks/auto-upgrade.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/tasks/auto-upgrade.nix b/nixos/modules/tasks/auto-upgrade.nix index d225778a387..91f4ae79ee9 100644 --- a/nixos/modules/tasks/auto-upgrade.nix +++ b/nixos/modules/tasks/auto-upgrade.nix @@ -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; }; }; |