39 lines
1016 B
Nix
39 lines
1016 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
bridge_port = 9005; # netstat -nlp | grep 9005
|
|
in
|
|
{
|
|
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;
|
|
inherit (config.networking) domain;
|
|
homeserverUrl = "https://${config.networking.domain}";
|
|
disablePresence = true;
|
|
disableTypingNotifications = true;
|
|
};
|
|
# logging.console = "silly";
|
|
};
|
|
serviceDependencies = [ "matrix-synapse.target" ];
|
|
port = bridge_port;
|
|
localpart = "_discord_";
|
|
package = pkgs.matrix-appservice-discord;
|
|
environmentFile = config.age.secrets.matrix_discord_bridge_token.path;
|
|
};
|
|
}
|