1
0
vcp-bula-nixfiles/hosts/pre-router/nginx.nix
2022-07-15 09:42:36 +02:00

32 lines
733 B
Nix

{ config, pkgs, ...}:
{
networking.interfaces = {
ens20 = {
ipv4.addresses = [{
address = "10.42.123.55";
prefixLength = 24;
}];
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.nginx = {
enable = true;
clientMaxBodySize = "400M";
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
};
services.nginx.virtualHosts."lightbuffet.bula22.de" = { # Gitea hostname
enableACME = true; # Use ACME certs
forceSSL = true; # Force SSL
locations."/" = {
proxyPass = "https://10.42.123.20:8006";
proxyWebsockets = true;
};
};
}