added well known for matrix
This commit is contained in:
parent
61cb1f690a
commit
c05aea36e6
2 changed files with 15 additions and 6 deletions
|
|
@ -14,7 +14,6 @@ in {
|
||||||
services = {
|
services = {
|
||||||
dendrite = {
|
dendrite = {
|
||||||
enable = true;
|
enable = true;
|
||||||
httpPort = 8448;
|
|
||||||
loadCredential = [
|
loadCredential = [
|
||||||
# $ nix-shell -p dendrite --run 'generate-keys --private-key /tmp/key'
|
# $ nix-shell -p dendrite --run 'generate-keys --private-key /tmp/key'
|
||||||
"matrix-server-key:${config.age.secrets.matrix-priv.path}"
|
"matrix-server-key:${config.age.secrets.matrix-priv.path}"
|
||||||
|
|
@ -54,12 +53,23 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
caddy.virtualHosts."matrix.jsw.tf".extraConfig = ''
|
caddy.virtualHosts = {
|
||||||
reverse_proxy /_matrix/* localhost:8448
|
"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"];
|
systemd.services.dendrite.after = ["postgresql.service"];
|
||||||
networking.firewall.allowedTCPPorts = [8448];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
services.caddy.virtualHosts."share.jsw.tf" = {
|
services.caddy.virtualHosts."share.jsw.tf" = {
|
||||||
serverAliases = ["www.share.jsw.tf"];
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
reverse_proxy :9000
|
reverse_proxy :9000
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue