services: try to fix federation for matrix

This commit is contained in:
Kabbone 2022-12-28 20:54:08 +01:00
parent df5170fca5
commit 094da6c1d6
Signed by: Kabbone
SSH Key Fingerprint: SHA256:A5zPB5I6u5V78V51c362BBdCwhDhfDUVbt7NfKdjWBY

View File

@ -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;
# };
# };
# };
}