grimm-nixos-laptop/modules/discord-matrix-bridge.nix

34 lines
1.0 KiB
Nix
Raw Permalink Normal View History

2024-05-11 22:55:59 +02:00
{ config, pkgs, ... }:
2024-05-08 21:50:08 +02:00
let
2024-05-11 22:55:59 +02:00
inherit (config.serverConfig) ports;
2024-05-08 21:50:08 +02:00
in
{
2024-05-08 21:49:37 +02:00
age.secrets.matrix_discord_bridge_token.file = ../secrets/matrix_discord_bridge_token.age;
2024-05-08 21:50:08 +02:00
services.matrix-synapse-next.settings.app_service_config_files = [
"/var/lib/matrix-synapse/discord-registration.yaml"
];
2024-05-08 21:49:37 +02:00
services.matrix-appservice-discord = {
enable = true;
settings = {
auth = {
usePrivilegedIntents = true; # typing status and stuff
};
bridge = {
enableSelfServiceBridging = true;
domain = config.services.matrix-synapse-next.settings.server_name;
homeserverUrl = config.services.matrix-synapse-next.settings.public_baseurl;
2024-05-08 21:49:37 +02:00
disablePresence = true;
disableTypingNotifications = true;
};
# logging.console = "silly";
2024-05-08 21:49:37 +02:00
};
2024-05-08 21:50:08 +02:00
serviceDependencies = [ "matrix-synapse.target" ];
port = ports.discord_matrix_bridge_port.port;
2024-05-08 21:49:37 +02:00
localpart = "_discord_";
package = pkgs.matrix-appservice-discord;
environmentFile = config.age.secrets.matrix_discord_bridge_token.path;
};
}