BUGFIX: fix conditional script construction in nixosAutoUpgrade.nix module

This commit is contained in:
Sam 2025-01-18 11:48:32 +00:00
parent d20f09ac39
commit 68c7d6d852
1 changed files with 5 additions and 5 deletions

View File

@ -72,11 +72,11 @@ in
unitConfig.RequiresMountsFor = cfg.configDir;
script = lib.strings.concatStrings [
"${auto-update-nixos}/bin/auto-update-nixos --operation ${cfg.operation} "
(lib.mkIf (cfg.configDir != "") "--flake ${cfg.configDir} ").content
(lib.mkIf (cfg.user != "") "--user ${cfg.user} ").content
(lib.mkIf (cfg.pushUpdates) "--update ").content
(lib.mkIf (cfg.reboot) "--reboot ").content
(lib.mkIf (cfg.extraFlags != "") cfg.extraFlags).content
(if cfg.configDir != "" then "--flake ${cfg.configDir} " else "")
(if cfg.user != "" then "--user ${cfg.user} " else "")
(if cfg.pushUpdates then "--update " else "")
(if cfg.reboot then "--reboot " else "")
cfg.extraFlags
];
};
timers."nixos-upgrade" = {