about summary refs log tree commit diff
path: root/static.nix
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2023-03-21 21:36:44 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2023-03-21 21:36:44 +0900
commitf14b484196e09e8c4596c03cd53320d0965210ed (patch)
tree31a9293ef1e90bba306a08c390295d3253603b0f /static.nix
parente0d6ebfc8fdc00415ff16cfc10e83d4b49e769d8 (diff)
downloadnixos-conf-f14b484196e09e8c4596c03cd53320d0965210ed.tar.gz
Let mingnho in
Diffstat (limited to 'static.nix')
-rw-r--r--static.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/static.nix b/static.nix
index 25f48af..2ce4124 100644
--- a/static.nix
+++ b/static.nix
@@ -54,8 +54,13 @@ in {
     };
 
     nginx = {
+      additionalModules = [ pkgs.nginxModules.pam ];
+      appendHttpConfig = ''
+        access_log off;
+      '';
       enable = true;
       enableReload = true;
+      logError = "/dev/null";
       recommendedGzipSettings = true;
       recommendedOptimisation = true;
       recommendedProxySettings = true;
@@ -64,7 +69,13 @@ in {
         ${domain} = {
           enableACME = true;
           forceSSL = true;
-          locations."/".index = "index.xhtml";
+          locations = {
+            "/".index = "index.html index.xhtml";
+            "/~mingnho/chat" = {
+              proxyPass = "http://127.0.0.1:3000";
+              proxyWebsockets = true;
+            };
+          };
           root = "/var/lib/www/${domain}";
         };