1
0
Fork 0

Services: fix autoupgrade typo

This commit is contained in:
Aires 2024-10-01 10:04:28 -04:00
parent 0a6c2df811
commit 8791642454
2 changed files with 5 additions and 4 deletions

View file

@ -38,7 +38,7 @@ while [[ $# -gt 0 ]]; do
shift shift
shift shift
;; ;;
--no-update|-n) --no-update|--no-upgrade|-n)
update=false update=false
shift shift
shift shift

View file

@ -15,6 +15,7 @@ in
extraFlags = lib.mkOption { extraFlags = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "Extra flags to pass to nixos-rebuild."; description = "Extra flags to pass to nixos-rebuild.";
default = "";
}; };
onCalendar = lib.mkOption { onCalendar = lib.mkOption {
default = "daily"; default = "daily";
@ -57,10 +58,10 @@ in
unitConfig.RequiresMountsFor = cfg.configDir; unitConfig.RequiresMountsFor = cfg.configDir;
script = lib.strings.concatStrings [ script = lib.strings.concatStrings [
"/run/current-system/sw/bin/nixos-upgrade-script --operation switch " "/run/current-system/sw/bin/nixos-upgrade-script --operation switch "
(lib.mkIf (cfg.configDir) "--flake ${cfg.configDir} ").content (lib.mkIf (cfg.configDir != "") "--flake ${cfg.configDir} ").content
(lib.mkIf (cfg.user) "--user ${cfg.user} ").content (lib.mkIf (cfg.user != "") "--user ${cfg.user} ").content
(lib.mkIf (!cfg.pushUpdates) "--no-update ").content (lib.mkIf (!cfg.pushUpdates) "--no-update ").content
(lib.mkIf (cfg.extraFlags) cfg.extraFlags).content (lib.mkIf (cfg.extraFlags != "") cfg.extraFlags).content
]; ];
}; };
timers."nixos-upgrade" = { timers."nixos-upgrade" = {