summaryrefslogtreecommitdiff
path: root/hosts/surtr/matrix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-25 13:42:02 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-25 13:42:02 +0100
commitb4293d801ec6d4d3e92f67afb95fc919bdbf9a2e (patch)
tree8c98ec1c5671defc7c283c65ce97ce1f46ec7595 /hosts/surtr/matrix
parent2f3dea9b282a991808243c1775851231776ac89b (diff)
downloadnixos-b4293d801ec6d4d3e92f67afb95fc919bdbf9a2e.tar
nixos-b4293d801ec6d4d3e92f67afb95fc919bdbf9a2e.tar.gz
nixos-b4293d801ec6d4d3e92f67afb95fc919bdbf9a2e.tar.bz2
nixos-b4293d801ec6d4d3e92f67afb95fc919bdbf9a2e.tar.xz
nixos-b4293d801ec6d4d3e92f67afb95fc919bdbf9a2e.zip
surtr: matrix: ma1sd
Diffstat (limited to 'hosts/surtr/matrix')
-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}