Skip to content

Commit

Permalink
Merge pull request #85185 from m1cr0man/legoaccounts
Browse files Browse the repository at this point in the history
acme: share accounts between certificates
  • Loading branch information
Mic92 authored Apr 14, 2020
2 parents c92a00c + 827d5e6 commit fd438d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nixos/modules/security/acme.nix
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,14 @@ in
User = data.user;
Group = data.group;
PrivateTmp = true;
StateDirectory = "acme/.lego/${cert} ${lpath}";
StateDirectory = "acme/.lego/${cert} acme/.lego/accounts ${lpath}";
StateDirectoryMode = if data.allowKeysForGroup then "750" else "700";
WorkingDirectory = spath;
# Only try loading the credentialsFile if the dns challenge is enabled
EnvironmentFile = if data.dnsProvider != null then data.credentialsFile else null;
ExecStart = pkgs.writeScript "acme-start" ''
#!${pkgs.runtimeShell} -e
test -L ${spath}/accounts -o -d ${spath}/accounts || ln -s ../accounts ${spath}/accounts
${pkgs.lego}/bin/lego ${renewOpts} || ${pkgs.lego}/bin/lego ${runOpts}
'';
ExecStartPost =
Expand Down

0 comments on commit fd438d5

Please sign in to comment.