1
0
Fork 0
pvv-nixos-config/hosts/bicep/services/nginx/default.nix

46 lines
853 B
Nix
Raw Permalink Normal View History

{ config, values, ... }:
{
2022-09-08 17:42:54 +02:00
security.acme = {
acceptTerms = true;
defaults.email = "danio@pvv.ntnu.no";
};
services.nginx = {
enable = true;
enableReload = true;
defaultListenAddresses = [
2023-05-07 10:20:32 +02:00
values.hosts.bicep.ipv4
"[${values.hosts.bicep.ipv6}]"
"127.0.0.1"
"127.0.0.2"
"[::1]"
];
appendConfig = ''
pcre_jit on;
worker_processes 8;
worker_rlimit_nofile 8192;
'';
eventsConfig = ''
multi_accept on;
worker_connections 4096;
'';
recommendedProxySettings = true;
recommendedTlsSettings = true;
recommendedGzipSettings = true;
recommendedBrotliSettings = true;
recommendedOptimisation = true;
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
systemd.services.nginx.serviceConfig = {
LimitNOFILE = 65536;
};
}