mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
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: {
|
security.acme.certs = filterAttrs (n: v: v != {}) (
|
||||||
webroot = vhostConfig.acmeRoot;
|
mapAttrs (vhostName: vhostConfig:
|
||||||
extraDomains = genAttrs vhostConfig.serverAliases (alias: null);
|
optionalAttrs vhostConfig.enableACME {
|
||||||
}) virtualHosts;
|
webroot = vhostConfig.acmeRoot;
|
||||||
|
extraDomains = genAttrs vhostConfig.serverAliases (alias: null);
|
||||||
|
}
|
||||||
|
) virtualHosts
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
users.extraUsers = optionalAttrs (cfg.user == "nginx") (singleton
|
users.extraUsers = optionalAttrs (cfg.user == "nginx") (singleton
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue