diff options
author | Lucas Savva <lucas@m1cr0man.com> | 2022-10-04 22:28:23 +0100 |
---|---|---|
committer | Winter <winter@winter.cafe> | 2022-10-06 10:30:24 -0400 |
commit | 49c0fd7d6005cab96c597d3c56ab0bade5f436c4 (patch) | |
tree | 9c7ad90a20fc07276a68ccf3b3b3311a2fe629b2 /nixos/modules/security | |
parent | 657ecbca0ece81c5e2a411d7044a3d837f520408 (diff) |
nixos/acme: Disable lego renew sleeping
Lego has a built-in mechanism for sleeping for a random amount of time before renewing a certificate. In our environment this is not only unnecessary (as our systemd timer takes care of it) but also unwanted since it slows down the execution of the systemd service encompassing it, thus also slowing down the start up of any services its depending on. Also added FixedRandomDelay to the timer for more predictability.
Diffstat (limited to 'nixos/modules/security')
-rw-r--r-- | nixos/modules/security/acme/default.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/security/acme/default.nix b/nixos/modules/security/acme/default.nix index 91ec24ab1f58d..e9299fb1b3adb 100644 --- a/nixos/modules/security/acme/default.nix +++ b/nixos/modules/security/acme/default.nix @@ -190,7 +190,7 @@ let ); renewOpts = escapeShellArgs ( commonOpts - ++ [ "renew" ] + ++ [ "renew" "--no-random-sleep" ] ++ optionals data.ocspMustStaple [ "--must-staple" ] ++ data.extraLegoRenewFlags ); @@ -223,9 +223,9 @@ let # have many certificates, the renewals are distributed over # the course of the day to avoid rate limits. AccuracySec = "${toString (_24hSecs / numCerts)}s"; - # Skew randomly within the day, per https://letsencrypt.org/docs/integration-guide/. RandomizedDelaySec = "24h"; + FixedRandomDelay = true; }; }; |