nginx module: Don't create acme certs if acme is not enabled
This commit is contained in:
parent
c61157b7e6
commit
d5a097fdb6
1 changed files with 8 additions and 4 deletions
|
@ -248,10 +248,14 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
security.acme.certs = mapAttrs (vhostName: vhostConfig: {
|
||||
webroot = vhostConfig.acmeRoot;
|
||||
extraDomains = genAttrs vhostConfig.serverAliases (alias: null);
|
||||
}) virtualHosts;
|
||||
security.acme.certs = filterAttrs (n: v: v != {}) (
|
||||
mapAttrs (vhostName: vhostConfig:
|
||||
optionalAttrs vhostConfig.enableACME {
|
||||
webroot = vhostConfig.acmeRoot;
|
||||
extraDomains = genAttrs vhostConfig.serverAliases (alias: null);
|
||||
}
|
||||
) virtualHosts
|
||||
);
|
||||
|
||||
|
||||
users.extraUsers = optionalAttrs (cfg.user == "nginx") (singleton
|
||||
|
|
Loading…
Reference in a new issue