Don't create a challenge dir if no local domains

This commit is contained in:
niten 2021-12-10 18:54:00 -08:00
parent 541890c08f
commit 1edfcad643

View File

@ -152,7 +152,8 @@ in {
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [ 80 443 ];
systemd = { systemd = {
tmpfiles.rules = let tmpfiles = mkIf hasLocalDomains {
rules = let
copies = concatMapAttrs (domain: domainOpts: copies = concatMapAttrs (domain: domainOpts:
domainOpts.local-copies) localDomains; domainOpts.local-copies) localDomains;
perms = copyOpts: if (copyOpts.group != null) then "0550" else "0500"; perms = copyOpts: if (copyOpts.group != null) then "0550" else "0500";
@ -168,6 +169,7 @@ in {
in (unique (concatMap (i: unique i) copy-paths)) ++ [ in (unique (concatMap (i: unique i) copy-paths)) ++ [
"d \"${cfg.challenge-path}\" 755 acme nginx - -" "d \"${cfg.challenge-path}\" 755 acme nginx - -"
]; ];
};
services = concatMapAttrs (domain: domainOpts: services = concatMapAttrs (domain: domainOpts:
concatMapAttrs (copy: copyOpts: let concatMapAttrs (copy: copyOpts: let