diff --git a/nixos/modules/security/acme.nix b/nixos/modules/security/acme.nix index 3734a06c3fa4..69f5a4e4cae9 100644 --- a/nixos/modules/security/acme.nix +++ b/nixos/modules/security/acme.nix @@ -104,7 +104,12 @@ 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}"; + othersHash = mkHash ( + "${toString acmeServer} ${data.keyType}" + + ( + optionalString (versionOlder "20.09" config.system.stateVersion) data.email + ) + ); accountDir = "/var/lib/acme/.lego/accounts/" + othersHash; protocolOpts = if useDns then (