diff options
author | Luke Granger-Brown <git@lukegb.com> | 2024-01-22 14:48:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 14:48:23 +0000 |
commit | f5344c8b879356f362e4943a9b8763340abad2d5 (patch) | |
tree | 068309d2310719a709c64b6c90391afc02e75311 /nixos | |
parent | 8b00be0c0e7c876d091fe0e4e8c3050b039ec2c1 (diff) | |
parent | d077cd8691af1957438a908e61ae271371c4d334 (diff) |
Merge pull request #280658 from simonhollingshead/add-fixedrandomdelay
nixos/auto-upgrade: add system.autoUpgrade.fixedRandomDelay
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/tasks/auto-upgrade.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/tasks/auto-upgrade.nix b/nixos/modules/tasks/auto-upgrade.nix index 29e3e313336f5..22311871274b9 100644 --- a/nixos/modules/tasks/auto-upgrade.nix +++ b/nixos/modules/tasks/auto-upgrade.nix @@ -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; }; }; |