summaryrefslogtreecommitdiff
path: root/hosts/surtr/matrix/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/surtr/matrix/default.nix')
-rw-r--r--hosts/surtr/matrix/default.nix34
1 files changed, 31 insertions, 3 deletions
diff --git a/hosts/surtr/matrix/default.nix b/hosts/surtr/matrix/default.nix
index c35153e5..f55872c0 100644
--- a/hosts/surtr/matrix/default.nix
+++ b/hosts/surtr/matrix/default.nix
@@ -62,9 +62,16 @@
62 services.nginx = { 62 services.nginx = {
63 recommendedProxySettings = true; 63 recommendedProxySettings = true;
64 64
65 upstreams."matrix-synapse" = { 65 upstreams = {
66 servers = { 66 "matrix-synapse" = {
67 "127.0.0.1:8008" = {}; 67 servers = {
68 "127.0.0.1:8008" = {};
69 };
70 };
71 "mxisd" = {
72 servers = {
73 "127.0.0.1:8090" = {};
74 };
68 }; 75 };
69 }; 76 };
70 77
@@ -91,6 +98,7 @@
91 ''; 98 '';
92 in { 99 in {
93 "/_matrix".proxyPass = "http://matrix-synapse"; 100 "/_matrix".proxyPass = "http://matrix-synapse";
101 "/_matrix/identity".proxyPass = "http://mxisd";
94 "/_synapse/client".proxyPass = "http://matrix-synapse"; 102 "/_synapse/client".proxyPass = "http://matrix-synapse";
95 "= /.well-known/matrix/server" = { 103 "= /.well-known/matrix/server" = {
96 extraConfig = '' 104 extraConfig = ''
@@ -232,5 +240,25 @@
232 owner = "turnserver"; 240 owner = "turnserver";
233 group = "turnserver"; 241 group = "turnserver";
234 }; 242 };
243
244 services.mxisd = {
245 enable = true;
246 matrix.domain = "synapse.li";
247 server = {
248 name = "localhost";
249 port = 8090;
250 };
251 extraConfig = {
252 server.publicUrl = "https://synapse.li";
253 storage = {
254 backend = "postgresql";
255 provider.postgresql = {
256 database = "//localhost:5432/ma1sd";
257 username = "ma1sd";
258 };
259 };
260 forward.servers = ["matrix.org"];
261 };
262 };
235 }; 263 };
236} 264}