cluster/services/matrix: add dns records

This commit is contained in:
Max Headroom 2023-12-03 23:17:12 +01:00
parent 38d22c1964
commit cb8744b99a

View file

@ -1,4 +1,4 @@
{ depot, ... }:
{ config, depot, ... }:
{
services.matrix = {
@ -16,4 +16,15 @@
address = "https://matrix.${depot.lib.meta.domain}/_matrix/federation/v1/version";
module = "https2xx";
};
dns.records = let
homeserverAddrs = map
(node: depot.hours.${node}.interfaces.primary.addrPublic)
config.services.matrix.nodes.homeserver;
in {
matrix.target = homeserverAddrs;
chat.target = homeserverAddrs;
stun.target = homeserverAddrs;
turn.target = homeserverAddrs;
};
}