1
0

modules/nixfiles: Spread auto upgrade over multiple hours

This commit is contained in:
clerie 2023-12-03 14:46:51 +01:00
parent 37c838836e
commit 41a52d55a3

View File

@ -27,7 +27,14 @@ in
Type = "oneshot"; Type = "oneshot";
ExecStart = pkgs.nixfiles-system-upgrade + "/bin/nixfiles-system-upgrade --no-confirm${optionalString cfg.allowReboot " --allow-reboot"}"; ExecStart = pkgs.nixfiles-system-upgrade + "/bin/nixfiles-system-upgrade --no-confirm${optionalString cfg.allowReboot " --allow-reboot"}";
}; };
startAt = "*-*-* 06:47:00"; };
systemd.timers.nixfiles-system-auto-upgrade = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "*-*-* 05:37:00";
RandomizedDelaySec = "2h";
};
after = [ "network-online.target" ];
}; };
}; };
} }