summary refs log tree commit diff
path: root/host/Rory-nginx/services/nginx
diff options
context:
space:
mode:
Diffstat (limited to 'host/Rory-nginx/services/nginx')
-rwxr-xr-xhost/Rory-nginx/services/nginx/nginx.nix2
-rwxr-xr-xhost/Rory-nginx/services/nginx/rory.gay/jitsi.nix32
2 files changed, 34 insertions, 0 deletions
diff --git a/host/Rory-nginx/services/nginx/nginx.nix b/host/Rory-nginx/services/nginx/nginx.nix
index 4364a2b..3680052 100755
--- a/host/Rory-nginx/services/nginx/nginx.nix
+++ b/host/Rory-nginx/services/nginx/nginx.nix
@@ -49,6 +49,8 @@
         "catgirlsaresexy.com" = import ./catgirlsaresexy.com/root.nix;
         "sugarcanemc.org" = import ./sugarcanemc.org/root.nix;
 
+        "jitsi.rory.gay" = import ./rory.gay/jitsi.nix;
+
         #matrix...
         "conduit.rory.gay" = import ./rory.gay/conduit.nix;
         "matrix.rory.gay" = import ./rory.gay/matrix.nix;
diff --git a/host/Rory-nginx/services/nginx/rory.gay/jitsi.nix b/host/Rory-nginx/services/nginx/rory.gay/jitsi.nix
new file mode 100755
index 0000000..ad8dd89
--- /dev/null
+++ b/host/Rory-nginx/services/nginx/rory.gay/jitsi.nix
@@ -0,0 +1,32 @@
+{
+  enableACME = true;
+  addSSL = true;
+  extraConfig = ''
+    ssi on;
+  '';
+  locations."@root_path".extraConfig = ''
+    rewrite ^/(.*)$ / break;
+  '';
+  locations."~ ^/([^/\\?&:'\"]+)$".tryFiles = "$uri @root_path";
+  locations."^~ /xmpp-websocket" = {
+    priority = 100;
+    proxyPass = "http://localhost:5280/xmpp-websocket";
+    proxyWebsockets = true;
+  };
+  locations."=/http-bind" = {
+    proxyPass = "http://localhost:5280/http-bind";
+    extraConfig = ''
+      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+      proxy_set_header Host $host;
+    '';
+  };
+  locations."=/external_api.js" = mkDefault {
+    alias = "${pkgs.jitsi-meet}/libs/external_api.min.js";
+  };
+  locations."=/config.js" = mkDefault {
+    alias = overrideJs "${pkgs.jitsi-meet}/config.js" "config" (recursiveUpdate defaultCfg cfg.config) cfg.extraConfig;
+  };
+  locations."=/interface_config.js" = mkDefault {
+    alias = overrideJs "${pkgs.jitsi-meet}/interface_config.js" "interfaceConfig" cfg.interfaceConfig "";
+  };
+}
\ No newline at end of file