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

31 lines
906 B
Nix

{config, lib, pkgs, ...}: let
root_host = "grimmauld.de";
bridge_port = 9005; # netstat -nlp | grep 9005
in {
age.secrets = {
matrix_discord_bridge_token = {
file = ../secrets/matrix_discord_bridge_token.age;
# mode = "0600";
};
};
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;
homeserverUrl = "https://grimmauld.de"; # fixme does this work? Potentially need root_host instead
};
};
port = bridge_port;
localpart = "_discord_bot"; # fixme
environmentFile = config.age.secrets.matrix_discord_bridge_token.path;
};
}