summary refs log tree commit diff
path: root/host/Spacebar-nginx/configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'host/Spacebar-nginx/configuration.nix')
-rwxr-xr-xhost/Spacebar-nginx/configuration.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/host/Spacebar-nginx/configuration.nix b/host/Spacebar-nginx/configuration.nix
index 56b5bf1..434b2ff 100755
--- a/host/Spacebar-nginx/configuration.nix
+++ b/host/Spacebar-nginx/configuration.nix
@@ -26,6 +26,13 @@
       recommendedProxySettings = true;
       recommendedTlsSettings = true;
       clientMaxBodySize = "50m";
+      appendConfig = ''
+        worker_processes 16;
+        '';
+      eventsConfig = ''
+        #use kqueue;
+        worker_connections 512;
+        '';
       virtualHosts = {
         # legacy
         "matrix.thearcanebrony.net" = import ./nginx-hosts/thearcanebrony.net/matrix.nix;
@@ -44,6 +51,11 @@
       };
     };
   };
+
+  systemd.services.nginx.serviceConfig = {
+    LimitNOFILE=5000000;
+  };
+
   systemd.services.nginx.requires = [ "data.mount" ];
   security.acme.acceptTerms = true;
   security.acme.defaults.email = "chris@spacebar.chat";