37 lines
1.1 KiB
Nix
37 lines
1.1 KiB
Nix
|
{ config, pkgs, ... }:
|
||
|
let
|
||
|
inherit (config.serverConfig) ports;
|
||
|
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 = false;
|
||
|
settings = {
|
||
|
auth = {
|
||
|
usePrivilegedIntents = true; # typing status and stuff
|
||
|
};
|
||
|
bridge = {
|
||
|
enableSelfServiceBridging = true;
|
||
|
domain = config.services.matrix-synapse.settings.server_name;
|
||
|
homeserverUrl = config.services.matrix-synapse.settings.public_baseurl;
|
||
|
disablePresence = true;
|
||
|
disableTypingNotifications = true;
|
||
|
};
|
||
|
inactiveAfterDays = 14;
|
||
|
# logging.console = "silly";
|
||
|
};
|
||
|
serviceDependencies = [ "matrix-synapse.target" ];
|
||
|
port = ports.discord_matrix_bridge_port.port;
|
||
|
localpart = "_discord_";
|
||
|
package = pkgs.matrix-appservice-discord;
|
||
|
environmentFile = config.age.secrets.matrix_discord_bridge_token.path;
|
||
|
};
|
||
|
|
||
|
environment.systemPackages = with pkgs; [ matrix-appservice-discord ];
|
||
|
}
|