nixos/acme: Add data.email to othersHash in nixos > 20.09

This commit is contained in:
Lucas Savva 2020-10-24 20:40:02 +01:00
parent 76401c9a3b
commit 79ecf069f5
No known key found for this signature in database
GPG key ID: F9CE6D3DCDC78F2D

View file

@ -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 (