auto update
This commit is contained in:
parent
80da4b731e
commit
69a2c4cfc8
|
@ -91,6 +91,7 @@ in {
|
||||||
system.services.nixosAutoUpgrade = {
|
system.services.nixosAutoUpgrade = {
|
||||||
enable = true;
|
enable = true;
|
||||||
persistent = true;
|
persistent = true;
|
||||||
|
reboot = false;
|
||||||
pushUpdates = true;
|
pushUpdates = true;
|
||||||
configDir = "/etc/nixos";
|
configDir = "/etc/nixos";
|
||||||
onCalendar = "daily";
|
onCalendar = "daily";
|
||||||
|
|
|
@ -20,6 +20,11 @@ in
|
||||||
description = "Extra flags to pass to nixos-rebuild.";
|
description = "Extra flags to pass to nixos-rebuild.";
|
||||||
default = "";
|
default = "";
|
||||||
};
|
};
|
||||||
|
reboot = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Automatically reboots the system if there is a kernel or systemd update.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
onCalendar = lib.mkOption {
|
onCalendar = lib.mkOption {
|
||||||
default = "daily";
|
default = "daily";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
@ -70,6 +75,7 @@ in
|
||||||
(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) "--update ").content
|
(lib.mkIf (cfg.pushUpdates) "--update ").content
|
||||||
|
(lib.mkIf (cfg.reboot) "--reboot ").content
|
||||||
(lib.mkIf (cfg.extraFlags != "") cfg.extraFlags).content
|
(lib.mkIf (cfg.extraFlags != "") cfg.extraFlags).content
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue