summary refs log tree commit diff
path: root/hosts/vps/matrix.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/vps/matrix.nix')
-rw-r--r--hosts/vps/matrix.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/hosts/vps/matrix.nix b/hosts/vps/matrix.nix
new file mode 100644
index 0000000..cb13326
--- /dev/null
+++ b/hosts/vps/matrix.nix
@@ -0,0 +1,23 @@
+{ pkgs, config, ... }:
+
+{
+  config = {
+    services.matrix-synapse = {
+        enable = true;
+        settings.server_name = config.networking.domain;
+        settings.listeners = [
+          { port = 8008;
+            bind_addresses = [ "::1" ];
+            type = "http";
+            tls = false;
+            x_forwarded = true;
+            resources = [ {
+              names = [ "client" "federation" ];
+              compress = true;
+            } ];
+          }
+        ];
+    };
+    networking.firewall.allowedTCPPorts = [80 443];
+  };
+}
\ No newline at end of file