mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 22:50:49 +00:00
nginx module: Don't create acme certs if acme is not enabled
This commit is contained in:
parent
c61157b7e6
commit
d5a097fdb6
|
@ -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