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