1
0
vcp-bula-nixfiles/hosts/pre-router/nginx.nix

32 lines
733 B
Nix
Raw Normal View History

2022-07-07 11:15:52 +02:00
{ 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;
};
2022-07-15 09:39:13 +02:00
services.nginx.virtualHosts."lightbuffet.bula22.de" = { # Gitea hostname
2022-07-07 11:15:52 +02:00
enableACME = true; # Use ACME certs
forceSSL = true; # Force SSL
locations."/" = {
proxyPass = "https://10.42.123.20:8006";
proxyWebsockets = true;
};
};
}