Services: fix autoupgrade including --update when not specified
This commit is contained in:
parent
1bdc5a5d84
commit
adb928573c
|
@ -65,13 +65,12 @@ in
|
||||||
};
|
};
|
||||||
path = config.aux.system.corePackages;
|
path = config.aux.system.corePackages;
|
||||||
unitConfig.RequiresMountsFor = cfg.configDir;
|
unitConfig.RequiresMountsFor = cfg.configDir;
|
||||||
script = lib.strings.concatStrings [
|
script =
|
||||||
"/run/current-system/sw/bin/nixos-operations-script --operation ${cfg.operation} "
|
"/run/current-system/sw/bin/nixos-operations-script --operation ${cfg.operation} "
|
||||||
(lib.mkIf (cfg.configDir != "") "--flake ${cfg.configDir} ").content
|
+ (if (cfg.configDir != "") then "--flake ${cfg.configDir} " else "")
|
||||||
(lib.mkIf (cfg.user != "") "--user ${cfg.user} ").content
|
+ (if (cfg.user != "") then "--user ${cfg.user} " else "")
|
||||||
(lib.mkIf (cfg.pushUpdates) "--update ").content
|
+ (if (cfg.pushUpdates) then "--update " else "")
|
||||||
(lib.mkIf (cfg.extraFlags != "") cfg.extraFlags).content
|
+ (if (cfg.extraFlags != "") then cfg.extraFlags else "");
|
||||||
];
|
|
||||||
};
|
};
|
||||||
timers."nixos-upgrade" = {
|
timers."nixos-upgrade" = {
|
||||||
wants = [ "network-online.target" ];
|
wants = [ "network-online.target" ];
|
||||||
|
|
Loading…
Reference in a new issue