cluster/services/matrix: host static resources redundantly

This commit is contained in:
Max Headroom 2024-05-29 10:17:49 +02:00
parent c4ee4559f6
commit 3a61f93b5b
2 changed files with 17 additions and 10 deletions

View file

@ -2,14 +2,21 @@
{
services.matrix = {
nodes.homeserver = [ "VEGAS" ];
nixos.homeserver = [
./homeserver.nix
./coturn.nix
./bridges/discord.nix
./federation.nix
./web-client.nix
];
nodes = {
homeserver = [ "VEGAS" ];
static = config.services.websites.nodes.host;
};
nixos = {
homeserver = [
./homeserver.nix
./coturn.nix
./bridges/discord.nix
];
static = [
./federation.nix
./web-client.nix
];
};
};
monitoring.blackbox.targets.matrix = {
@ -23,8 +30,8 @@
config.services.matrix.nodes.homeserver;
in {
matrix.target = homeserverAddrs;
chat.target = homeserverAddrs;
stun.target = homeserverAddrs;
turn.target = homeserverAddrs;
chat.consulService = "static-lb";
};
}

View file

@ -8,6 +8,6 @@ in
{
services.nginx.virtualHosts."top-level.${domain}".locations = {
"= /.well-known/matrix/server".alias = federation;
inherit (config.services.nginx.virtualHosts."matrix.${domain}".locations) "= /.well-known/matrix/client";
"= /.well-known/matrix/client".return = "302 https://matrix.${domain}/.well-known/matrix/client";
};
}