Merge pull request #280658 from simonhollingshead/add-fixedrandomdelay

nixos/auto-upgrade: add system.autoUpgrade.fixedRandomDelay
This commit is contained in:
Luke Granger-Brown 2024-01-22 14:48:23 +00:00 committed by GitHub
commit f5344c8b87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -109,6 +109,17 @@ in {
'';
};
fixedRandomDelay = mkOption {
default = false;
type = types.bool;
example = true;
description = lib.mdDoc ''
Make the randomized delay consistent between runs.
This reduces the jitter between automatic upgrades.
See {option}`randomizedDelaySec` for configuring the randomized delay.
'';
};
rebootWindow = mkOption {
description = lib.mdDoc ''
Define a lower and upper time value (in HH:MM format) which
@ -253,6 +264,7 @@ in {
systemd.timers.nixos-upgrade = {
timerConfig = {
RandomizedDelaySec = cfg.randomizedDelaySec;
FixedRandomDelay = cfg.fixedRandomDelay;
Persistent = cfg.persistent;
};
};