{config, ...}: let customDomain = config.customOps.domain.fqdn; in { imports = [ ./captiveportal.nix ./tor-snowflake.nix ]; networking.firewall.allowedTCPPorts = [80 443]; services.nginx = { enable = true; recommendedTlsSettings = true; recommendedOptimisation = true; recommendedGzipSettings = true; recommendedUwsgiSettings = true; recommendedProxySettings = true; recommendedBrotliSettings = true; sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL"; virtualHosts.${customDomain} = { default = true; root = "/var/www/${customDomain}"; forceSSL = true; enableACME = true; }; }; services.phpfpm.pools.mypool = { user = "nobody"; settings = { "pm" = "dynamic"; "listen.owner" = config.services.nginx.user; "pm.max_children" = 75; "pm.start_servers" = 10; "pm.min_spare_servers" = 5; "pm.max_spare_servers" = 20; }; }; security.acme = { acceptTerms = true; defaults.email = "security@${config.mailserver.fqdn}"; }; }