32 lines
737 B
Nix
32 lines
737 B
Nix
{config, ...}: let
|
|
customDomain = config.customOps.domain;
|
|
in {
|
|
imports = [./captiveportal.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;
|
|
};
|
|
};
|
|
|
|
security.acme = {
|
|
acceptTerms = true;
|
|
defaults.email = "security@${config.mailserver.fqdn}";
|
|
};
|
|
}
|