modules/nixfiles: Specify dedicated system update times per host
This commit is contained in:
parent
97cb51e4fb
commit
d05f74ece9
@ -186,6 +186,7 @@
|
||||
clerie.nixfiles.system-auto-upgrade = {
|
||||
enable = true;
|
||||
allowReboot = true;
|
||||
startAt = "*-*-* 06:22:00";
|
||||
};
|
||||
|
||||
clerie.monitoring = {
|
||||
|
@ -186,6 +186,7 @@
|
||||
clerie.nixfiles.system-auto-upgrade = {
|
||||
enable = true;
|
||||
allowReboot = true;
|
||||
startAt = "*-*-* 07:22:00";
|
||||
};
|
||||
|
||||
clerie.monitoring = {
|
||||
|
@ -15,6 +15,11 @@ in
|
||||
default = false;
|
||||
description = "Monitor NixOS";
|
||||
};
|
||||
startAt = mkOption {
|
||||
type = with types; nullOr string;
|
||||
default = null;
|
||||
description = "Systemd time string for starting the unit";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
@ -31,8 +36,8 @@ in
|
||||
systemd.timers.nixfiles-system-auto-upgrade = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-* 05:37:00";
|
||||
RandomizedDelaySec = "2h";
|
||||
OnCalendar = if cfg.startAt == null then "*-*-* 05:37:00" else cfg.startAt;
|
||||
RandomizedDelaySec = if cfg.startAt == null then "2h" else "10m";
|
||||
};
|
||||
after = [ "network-online.target" ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user