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
streamlink-twitch-gui-bin streamlink-twitch-gui-bin
element-desktop element-desktop
nheko
pulsemixer pulsemixer
#yubioath-flutter #yubioath-flutter
nitrokey-app nitrokey-app

View File

@ -36,9 +36,19 @@ in {
locations."/".extraConfig = '' locations."/".extraConfig = ''
return 404; return 404;
''; '';
locations."/_matrix".proxyPass = "http://[::1]:8008"; locations."/_matrix".proxyPass = "http://127.0.0.1:8008";
locations."/_synapse/client".proxyPass = "http://[::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; enable = true;
settings = { settings = {
server_name = config.networking.domain; server_name = config.networking.domain;
public_baseurl = "https://matrix.${config.networking.domain}";
listeners = [ listeners = [
{ port = 8008; { port = 8008;
bind_addresses = [ "::1" ]; bind_addresses = [ "::1" "127.0.0.1" ];
type = "http"; type = "http";
tls = false; tls = false;
x_forwarded = true; x_forwarded = true;
resources = [ { resources = [
names = [ "client" "federation" ]; { names = [ "client" ]; compress = true; }
compress = true; { names = [ "federation" ]; compress = false; }
} ]; ];
} }
]; ];
}; };
@ -68,4 +79,10 @@ in {
file = ../../../secrets/services/matrix/synapse.age; file = ../../../secrets/services/matrix/synapse.age;
owner = "matrix-synapse"; owner = "matrix-synapse";
}; };
systemd.services = {
matrix-synapse = {
requires = [ "postgresql.service" ];
};
};
} }