Update well-known matrix

This commit is contained in:
2022-04-11 14:26:50 +01:00
parent a5a0f367cb
commit e02557ba90
2 changed files with 13 additions and 4 deletions

View File

@@ -1,6 +1,8 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
{ {
networking.firewall.allowedTCPPorts = [ 80 8448 443 ];
services.caddy = { services.caddy = {
enable = true; enable = true;
virtualHosts = { virtualHosts = {
@@ -18,6 +20,15 @@
''; '';
}; };
"broccoli.town" = {
extraConfig = ''
header /.well-known/* "Access-Control-Allow-Origin" "*"
respond /.well-known/matrix/client "{\"m.homeserver\": {\"base_url\": \"https://broccoli.town\"}}"
reverse_proxy /_matrix/* http://localhost:8008
reverse_proxy /_synapse/client/* http://localhost:8008
'';
};
"chat.broccoli.town" = { "chat.broccoli.town" = {
extraConfig = '' extraConfig = ''
header { header {
@@ -29,8 +40,8 @@
root * ${pkgs.element-web.override { root * ${pkgs.element-web.override {
conf = { conf = {
default_server_config."m.homeserver" = { default_server_config."m.homeserver" = {
"base_url" = "https://matrix.broccoli.town"; "base_url" = "https://broccoli.town";
"server_name" = "matrix.broccoli.town"; "server_name" = "broccoli.town";
}; };
}; };
} }

View File

@@ -2,8 +2,6 @@
let let
fqdn = "matrix.broccoli.town"; fqdn = "matrix.broccoli.town";
in { in {
networking.firewall.allowedTCPPorts = [ 80 8448 443 ];
services.matrix-synapse = { services.matrix-synapse = {
enable = true; enable = true;
settings = { settings = {