lol

nginx module: Don't create acme certs if acme is not enabled

authored by

Franz Pletz and committed by
Robin Gloster
d5a097fd c61157b7

+8 -4
+8 -4
nixos/modules/services/web-servers/nginx/default.nix
··· 248 248 }; 249 249 }; 250 250 251 - security.acme.certs = mapAttrs (vhostName: vhostConfig: { 252 - webroot = vhostConfig.acmeRoot; 253 - extraDomains = genAttrs vhostConfig.serverAliases (alias: null); 254 - }) virtualHosts; 251 + security.acme.certs = filterAttrs (n: v: v != {}) ( 252 + mapAttrs (vhostName: vhostConfig: 253 + optionalAttrs vhostConfig.enableACME { 254 + webroot = vhostConfig.acmeRoot; 255 + extraDomains = genAttrs vhostConfig.serverAliases (alias: null); 256 + } 257 + ) virtualHosts 258 + ); 255 259 256 260 257 261 users.extraUsers = optionalAttrs (cfg.user == "nginx") (singleton