summary refs log tree commit diff
path: root/host/Spacebar-nginx/nginx-hosts/fosscord.com
diff options
context:
space:
mode:
Diffstat (limited to 'host/Spacebar-nginx/nginx-hosts/fosscord.com')
-rwxr-xr-xhost/Spacebar-nginx/nginx-hosts/fosscord.com/matrix.nix14
-rw-r--r--host/Spacebar-nginx/nginx-hosts/fosscord.com/root.nix16
2 files changed, 30 insertions, 0 deletions
diff --git a/host/Spacebar-nginx/nginx-hosts/fosscord.com/matrix.nix b/host/Spacebar-nginx/nginx-hosts/fosscord.com/matrix.nix
new file mode 100755
index 0000000..ac21846
--- /dev/null
+++ b/host/Spacebar-nginx/nginx-hosts/fosscord.com/matrix.nix
@@ -0,0 +1,14 @@
+{
+  enableACME = true;
+  addSSL = true;
+  locations = {
+    "/" = {
+      proxyPass = "http://192.168.1.200:8009";
+      proxyWebsockets = true;
+      extraConfig =
+        "proxy_ssl_server_name on;" +
+        "proxy_pass_header Authorization;"
+        ;
+    };
+  };
+}
diff --git a/host/Spacebar-nginx/nginx-hosts/fosscord.com/root.nix b/host/Spacebar-nginx/nginx-hosts/fosscord.com/root.nix
new file mode 100644
index 0000000..7efa326
--- /dev/null
+++ b/host/Spacebar-nginx/nginx-hosts/fosscord.com/root.nix
@@ -0,0 +1,16 @@
+{ lib, config }: {  
+  locations = {
+    "/" = {
+      extraConfig =
+        ''
+        return 301 https://spacebar.chat$request_uri;
+        '';
+    };
+    ".well-known/matrix/server" = {
+      root = "/var/lib/matrix";
+    };
+    "^~ /.well-known/acme-challenge/" = {
+      root = "/var/lib/acme/acme-challenge";
+    };
+  };
+}