diff --git a/modules/nixos/nixosAutoUpgrade.nix b/modules/nixos/nixosAutoUpgrade.nix index 8609b7c..bd99288 100644 --- a/modules/nixos/nixosAutoUpgrade.nix +++ b/modules/nixos/nixosAutoUpgrade.nix @@ -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" = {