infra/hosts/nachtigall/apps/nginx.nix
teutat3s 815033c764
treewide: apply nixpkgs-fmt
Used command:
nixpkgs-fmt .
2024-01-27 20:29:30 +01:00

36 lines
692 B
Nix

{ config
, lib
, pkgs
, self
, ...
}:
let
acmeEmailAddress = "admins@pub.solar";
webserverGroup = "hakkonaut";
in
{
services.nginx = {
enable = true;
group = webserverGroup;
enableReload = true;
proxyCachePath.cache = {
enable = true;
};
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
appendHttpConfig = ''
# https://my.f5.com/manage/s/article/K51798430
proxy_headers_hash_bucket_size 128;
'';
};
security.acme = {
acceptTerms = true;
defaults.email = acmeEmailAddress;
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
}