25 lines
691 B
Nix
25 lines
691 B
Nix
{
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
security.acme.acceptTerms = true;
|
|
security.acme.defaults.email = "spam@krebsco.de";
|
|
|
|
services.nginx = {
|
|
enable = true;
|
|
recommendedGzipSettings = true;
|
|
recommendedOptimisation = true;
|
|
recommendedTlsSettings = true;
|
|
|
|
enableReload = true;
|
|
|
|
virtualHosts.default = {
|
|
default = true;
|
|
locations."= /etc/os-release".extraConfig = ''
|
|
default_type text/plain;
|
|
alias /etc/os-release;
|
|
'';
|
|
# needed for acmeFallback in sync-containers, or other machines not reachable globally
|
|
locations."~ ^/.well-known/acme-challenge/".root = "/var/lib/acme/acme-challenge";
|
|
};
|
|
};
|
|
}
|