From e3120397a5a560bd4fd5231eb1e87c5ca73d7ef3 Mon Sep 17 00:00:00 2001 From: Lucas Savva Date: Fri, 18 Dec 2020 12:57:35 +0000 Subject: [PATCH] nixos/acme: Remove dependency on system version for hash This means that all systems running from master will trigger new certificate creation on next rebuild. Race conditions around multiple account creation are fixed in #106857, not this commit. --- nixos/modules/security/acme.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/nixos/modules/security/acme.nix b/nixos/modules/security/acme.nix index 69f5a4e4cae..f427ae9d1c6 100644 --- a/nixos/modules/security/acme.nix +++ b/nixos/modules/security/acme.nix @@ -104,12 +104,7 @@ let mkHash = with builtins; val: substring 0 20 (hashString "sha256" val); certDir = mkHash hashData; domainHash = mkHash "${concatStringsSep " " extraDomains} ${data.domain}"; - othersHash = mkHash ( - "${toString acmeServer} ${data.keyType}" - + ( - optionalString (versionOlder "20.09" config.system.stateVersion) data.email - ) - ); + othersHash = mkHash "${toString acmeServer} ${data.keyType} ${data.email}"; accountDir = "/var/lib/acme/.lego/accounts/" + othersHash; protocolOpts = if useDns then (