git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #85185 from m1cr0man/legoaccounts

acme: share accounts between certificates

commitfd438d5f09d8f8da3d46b7258507abef1571278c authorJörg Thalheim <Mic92@users.noreply.github.com> dateTue 14 Apr 2020, 13:12 (7 years ago) parentc92a00c827d5e6
1 file changed+2−1
nixos/modules/security/acme.nix+2−1
nixos/modules/security/acme.nix+2−1
@@ -330,13 +330,14 @@ in
330330 User = data.user;
331331 Group = data.group;
332332 PrivateTmp = true;
333− StateDirectory = "acme/.lego/${cert} ${lpath}";
333+ StateDirectory = "acme/.lego/${cert} acme/.lego/accounts ${lpath}";
334334 StateDirectoryMode = if data.allowKeysForGroup then "750" else "700";
335335 WorkingDirectory = spath;
336336 # Only try loading the credentialsFile if the dns challenge is enabled
337337 EnvironmentFile = if data.dnsProvider != null then data.credentialsFile else null;
338338 ExecStart = pkgs.writeScript "acme-start" ''
339339 #!${pkgs.runtimeShell} -e
340+ test -L ${spath}/accounts -o -d ${spath}/accounts || ln -s ../accounts ${spath}/accounts
340341 ${pkgs.lego}/bin/lego ${renewOpts} || ${pkgs.lego}/bin/lego ${runOpts}
341342 '';
342343 ExecStartPost =