From fd7e56a15062b4bcd1f664240448b4c2516e473b Mon Sep 17 00:00:00 2001 From: Atridad Lahiji Date: Tue, 17 Feb 2026 19:05:15 -0700 Subject: [PATCH] Update nginx.nix --- modules/nginx.nix | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/modules/nginx.nix b/modules/nginx.nix index 8253544..2d4bed6 100644 --- a/modules/nginx.nix +++ b/modules/nginx.nix @@ -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};