diff --git a/hosts/VEGAS/services/matrix/bridges/discord.nix b/hosts/VEGAS/services/matrix/bridges/discord.nix new file mode 100644 index 0000000..932d700 --- /dev/null +++ b/hosts/VEGAS/services/matrix/bridges/discord.nix @@ -0,0 +1,30 @@ +{ config, tools, ... }: +let + inherit (tools.meta) domain; +in +{ + age.secrets = { + matrix-appservice-discord-token = { + file = ../../../../../secrets/matrix-appservice-discord-token.age; + owner = "root"; + group = "root"; + mode = "0400"; + }; + }; + services.matrix-appservice-discord = { + enable = true; + environmentFile = config.age.secrets.matrix-appservice-discord-token.path; + settings = { + bridge = { + inherit domain; + homeserverUrl = "https://matrix.${domain}:443"; + disablePresence = false; + disableTypingNotifications = false; + disableDeletionForwarding = false; + enableSelfServiceBridging = true; + disableReadReceipts = false; + disableJoinLeaveNotifications = true; + }; + }; + }; +} diff --git a/hosts/VEGAS/services/matrix/default.nix b/hosts/VEGAS/services/matrix/default.nix index 21096fa..5cdf783 100644 --- a/hosts/VEGAS/services/matrix/default.nix +++ b/hosts/VEGAS/services/matrix/default.nix @@ -46,6 +46,7 @@ let cfg = config.services.matrix-synapse; in { imports = [ + ./bridges/discord.nix ./federation.nix ./web-client.nix ]; diff --git a/secrets/matrix-appservice-discord-token.age b/secrets/matrix-appservice-discord-token.age new file mode 100644 index 0000000..85b9545 Binary files /dev/null and b/secrets/matrix-appservice-discord-token.age differ