added well known for matrix

This commit is contained in:
Jurn Wubben 2025-05-25 18:10:23 +02:00
parent 312888f8df
commit cb39b31583
2 changed files with 15 additions and 6 deletions

View file

@ -14,7 +14,6 @@ in {
services = {
dendrite = {
enable = true;
httpPort = 8448;
loadCredential = [
# $ nix-shell -p dendrite --run 'generate-keys --private-key /tmp/key'
"matrix-server-key:${config.age.secrets.matrix-priv.path}"
@ -54,12 +53,23 @@ in {
];
};
caddy.virtualHosts."matrix.jsw.tf".extraConfig = ''
reverse_proxy /_matrix/* localhost:8448
caddy.virtualHosts = {
"jsw.tf".extraConfig = ''
header /.well-known/matrix/* Content-Type application/json
header /.well-known/matrix/* Access-Control-Allow-Origin *
respond /.well-known/matrix/server `{"m.server": "matrix.jsw.tf:443"}`
respond /.well-known/matrix/client `{"m.homeserver": {"base_url": "https://matrix.jsw.tf"}}`
'';
"matrix.jsw.tf".extraConfig = ''
header /.well-known/matrix/* Content-Type application/json
header /.well-known/matrix/* Access-Control-Allow-Origin *
respond /.well-known/matrix/server `{"m.server": "matrix.jsw.tf:443"}`
respond /.well-known/matrix/client `{"m.homeserver": {"base_url": "https://matrix.jsw.tf"}}`
reverse_proxy /_matrix/* localhost:8008
'';
};
};
systemd.services.dendrite.after = ["postgresql.service"];
networking.firewall.allowedTCPPorts = [8448];
};
}

View file

@ -18,7 +18,6 @@
};
services.caddy.virtualHosts."share.jsw.tf" = {
serverAliases = ["www.share.jsw.tf"];
extraConfig = ''
reverse_proxy :9000
'';