services: matrix add public base url

This commit is contained in:
Kabbone 2022-12-28 16:08:10 +01:00
parent 05d112b865
commit bcd1e1a841
Signed by: Kabbone
SSH Key Fingerprint: SHA256:A5zPB5I6u5V78V51c362BBdCwhDhfDUVbt7NfKdjWBY
2 changed files with 25 additions and 7 deletions

View File

@ -31,6 +31,7 @@
streamlink
streamlink-twitch-gui-bin
element-desktop
nheko
pulsemixer
#yubioath-flutter
nitrokey-app

View File

@ -36,9 +36,19 @@ in {
locations."/".extraConfig = ''
return 404;
'';
locations."/_matrix".proxyPass = "http://[::1]:8008";
locations."/_synapse/client".proxyPass = "http://[::1]:8008";
locations."/_matrix".proxyPass = "http://127.0.0.1:8008";
locations."/_synapse/client".proxyPass = "http://127.0.0.1:8008";
};
# "element.${config.networking.domain}" = {
# enableACME = true;
# forceSSL = true;
#
# root = pkgs.element-web.override {
# conf = {
# default_server_config = clientConfig;
# };
# };
# };
};
};
@ -46,16 +56,17 @@ in {
enable = true;
settings = {
server_name = config.networking.domain;
public_baseurl = "https://matrix.${config.networking.domain}";
listeners = [
{ port = 8008;
bind_addresses = [ "::1" ];
bind_addresses = [ "::1" "127.0.0.1" ];
type = "http";
tls = false;
x_forwarded = true;
resources = [ {
names = [ "client" "federation" ];
compress = true;
} ];
resources = [
{ names = [ "client" ]; compress = true; }
{ names = [ "federation" ]; compress = false; }
];
}
];
};
@ -68,4 +79,10 @@ in {
file = ../../../secrets/services/matrix/synapse.age;
owner = "matrix-synapse";
};
systemd.services = {
matrix-synapse = {
requires = [ "postgresql.service" ];
};
};
}