From 094da6c1d6ea8e846095e14020a4a050bb0e13f6 Mon Sep 17 00:00:00 2001 From: Kabbone Date: Wed, 28 Dec 2022 20:54:08 +0100 Subject: [PATCH] services: try to fix federation for matrix --- modules/services/server/matrix.nix | 31 ++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/modules/services/server/matrix.nix b/modules/services/server/matrix.nix index 411b6e8..da49812 100644 --- a/modules/services/server/matrix.nix +++ b/modules/services/server/matrix.nix @@ -10,7 +10,7 @@ let "m.homeserver".base_url = "https://${fqdn}"; "m.identity_server" = {}; }; - serverConfig."m.server" = "${config.services.matrix-synapse.settings.server_name}:443"; + serverConfig."m.server" = "${fqdn}:443"; mkWellKnown = data: '' add_header Content-Type application/json; add_header Access-Control-Allow-Origin *; @@ -36,8 +36,8 @@ in { locations."/".extraConfig = '' return 404; ''; - locations."/_matrix".proxyPass = "http://127.0.0.1:8008"; - locations."/_synapse/client".proxyPass = "http://127.0.0.1:8008"; + locations."/_matrix".proxyPass = "http://[::1]:8008"; + locations."/_synapse/client".proxyPass = "http://[::1]:8008"; }; # "element.${config.networking.domain}" = { # enableACME = true; @@ -59,7 +59,7 @@ in { public_baseurl = "https://matrix.${config.networking.domain}"; listeners = [ { port = 8008; - bind_addresses = [ "::1" "127.0.0.1" ]; + bind_addresses = [ "::1" ]; type = "http"; tls = false; x_forwarded = true; @@ -85,4 +85,27 @@ in { requires = [ "postgresql.service" ]; }; }; + +# users = { +# users = { +# mautrix_whatsapp = { +# uid = 3001; +# group = "mautrix_whatsapp"; +# isSystemUser = true; +# }; +# mautrix_telegram = { +# uid = 3002; +# group = "matrix_appservice_slack"; +# isSystemUser = true; +# }; +# }; +# groups = { +# mautrix_whatsapp = { +# gid = 3001; +# }; +# mautrix_telegram = { +# gid = 3002; +# }; +# }; +# }; }