grimm-nix-server/modules/discord-matrix-bridge.nix

26 lines
786 B
Nix
Raw Normal View History

{config, lib, pkgs, ...}: let
root_host = "grimmauld.de";
bridge_port = 9005; # netstat -nlp | grep 9005
in {
2024-01-26 13:50:59 +01:00
age.secrets.matrix_discord_bridge_token.file = ../secrets/matrix_discord_bridge_token.age;
services.matrix-synapse-next.settings.app_service_config_files = [ "/var/lib/matrix-synapse/discord-registration.yaml" ];
services.matrix-appservice-discord = {
enable = true;
settings = {
auth = {
usePrivilegedIntents = true; # typing status and stuff
};
bridge = {
enableSelfServiceBridging = true;
domain = root_host;
2024-01-26 13:50:59 +01:00
homeserverUrl = "https://${root_host}";
};
};
port = bridge_port;
2024-01-26 13:50:59 +01:00
localpart = "_discord_bot";
environmentFile = config.age.secrets.matrix_discord_bridge_token.path;
};
}