From b4293d801ec6d4d3e92f67afb95fc919bdbf9a2e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 25 Feb 2022 13:42:02 +0100 Subject: surtr: matrix: ma1sd --- hosts/surtr/matrix/default.nix | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) (limited to 'hosts/surtr/matrix') 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 @@ services.nginx = { recommendedProxySettings = true; - upstreams."matrix-synapse" = { - servers = { - "127.0.0.1:8008" = {}; + upstreams = { + "matrix-synapse" = { + servers = { + "127.0.0.1:8008" = {}; + }; + }; + "mxisd" = { + servers = { + "127.0.0.1:8090" = {}; + }; }; }; @@ -91,6 +98,7 @@ ''; in { "/_matrix".proxyPass = "http://matrix-synapse"; + "/_matrix/identity".proxyPass = "http://mxisd"; "/_synapse/client".proxyPass = "http://matrix-synapse"; "= /.well-known/matrix/server" = { extraConfig = '' @@ -232,5 +240,25 @@ owner = "turnserver"; group = "turnserver"; }; + + services.mxisd = { + enable = true; + matrix.domain = "synapse.li"; + server = { + name = "localhost"; + port = 8090; + }; + extraConfig = { + server.publicUrl = "https://synapse.li"; + storage = { + backend = "postgresql"; + provider.postgresql = { + database = "//localhost:5432/ma1sd"; + username = "ma1sd"; + }; + }; + forward.servers = ["matrix.org"]; + }; + }; }; } -- cgit v1.2.3