Update nginx.nix
All checks were successful
Deploy NixOS / deploy (push) Successful in 43s

This commit is contained in:
2026-02-17 19:05:15 -07:00
parent 097a60c0e0
commit fd7e56a150

View File

@@ -29,31 +29,16 @@ let
];
};
# Helper: standard proxy virtual host
mkProxy = port: {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://${upstream}:${toString port}";
proxyWebsockets = true;
extraConfig = "if ($fuckai) { return 444; }";
};
};
# Helper: proxy host with websocket support and extra location config
mkProxyWs = port: extraLocationConfig: {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://${upstream}:${toString port}";
proxyWebsockets = true;
extraConfig = ''
if ($fuckai) { return 444; }
${extraLocationConfig}
'';
};
};
# Helper: stream server block (TCP + UDP)
mkStream = port: ''
server {
listen ${toString port};