summary refs log tree commit diff
path: root/host/Rory-nginx/hosts
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-03-16 15:23:41 +0100
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-03-16 15:23:41 +0100
commit8475f73f0d4a2870e04ec3947ac7a5f55006dcc8 (patch)
tree09f005efa10a6f584f8191032427833b20549ce0 /host/Rory-nginx/hosts
parentUpdate flake (diff)
downloadRory-Open-Architecture-8475f73f0d4a2870e04ec3947ac7a5f55006dcc8.tar.xz
add matrix...
Diffstat (limited to 'host/Rory-nginx/hosts')
-rwxr-xr-xhost/Rory-nginx/hosts/rory.gay/matrix.nix6
-rwxr-xr-xhost/Rory-nginx/hosts/rory.gay/root.nix17
2 files changed, 23 insertions, 0 deletions
diff --git a/host/Rory-nginx/hosts/rory.gay/matrix.nix b/host/Rory-nginx/hosts/rory.gay/matrix.nix
new file mode 100755
index 0000000..6a638c3
--- /dev/null
+++ b/host/Rory-nginx/hosts/rory.gay/matrix.nix
@@ -0,0 +1,6 @@
+{
+  enableACME = true;
+  addSSL = true;
+  locations."/_matrix".proxyPass = "http://192.168.1.5:8008"; 
+  locations."/_synapse/client".proxyPass = "http://192.168.1.5:8008";   
+}
diff --git a/host/Rory-nginx/hosts/rory.gay/root.nix b/host/Rory-nginx/hosts/rory.gay/root.nix
index 4307cf4..c3dfb2f 100755
--- a/host/Rory-nginx/hosts/rory.gay/root.nix
+++ b/host/Rory-nginx/hosts/rory.gay/root.nix
@@ -4,4 +4,21 @@
   addSSL = true;
   extraConfig = ''
     autoindex on;'';
+
+  locations."= /.well-known/matrix/server".extraConfig = ''
+    add_header Content-Type application/json;
+    add_header Access-Control-Allow-Origin *;
+    return 200 '${builtins.toJSON {
+      "m.server" = "matrix.rory.gay:443";
+    }}}';
+  ''; 
+  locations."= /.well-known/matrix/client".extraConfig = ''
+    add_header Content-Type application/json;
+    add_header Access-Control-Allow-Origin *;
+    return 200 '${builtins.toJSON {
+      "m.homeserver".base_url = "https://matrix.rory.gay";
+      "m.identity_server" = {};
+    }
+    }';
+  ''; 
 }