nix/nixos/services/mautrix/lib.nix
2024-04-28 11:35:37 +01:00

27 lines
531 B
Nix

{
toAppRegistration = {
port,
id,
as_token,
hs_token,
sender_localpart,
rate_limited ? false,
...
} @ conf:
builtins.toJSON ({
namespaces = {
users = [
{
exclusive = true;
regex = "^@${id}_.*:tristans.cloud$";
}
{
exclusive = true;
regex = "^@${id}bot:tristans.cloud$";
}
];
};
url = "http://localhost:${toString port}";
}
// conf);
}