From eea7ccf7a3b5c2b17f6b87245a342803f1b1f9ab Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 16 Oct 2021 20:23:35 +0200 Subject: [PATCH] VEGAS/matrix: add Discord bridge --- .../VEGAS/services/matrix/bridges/discord.nix | 30 ++++++++++++++++++ hosts/VEGAS/services/matrix/default.nix | 1 + secrets/matrix-appservice-discord-token.age | Bin 0 -> 687 bytes 3 files changed, 31 insertions(+) create mode 100644 hosts/VEGAS/services/matrix/bridges/discord.nix create mode 100644 secrets/matrix-appservice-discord-token.age 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 0000000000000000000000000000000000000000..85b9545a08b54eb5a2ebe97af19900916942a9da GIT binary patch literal 687 zcmZ9_OKZ~r003ac2aoVAc0N0SyG|R4H0Y(rAbH*72g>fgSi@d+CPz(}?BN?0}{A?$uX7E_B6$)3_KslGz zV;L-j!5Tnnwq=ndo#uF?FzDs7wF1np zLSSxCL-L7O08S(|Pl>ZSUMPa10n?)=Azvbvvv3Gb0o9Ba#@z`UwW3*tQY78<7bO9O z^At^1$>?aQ8V_rBQo>kj`&RG>VGDP%3JX%60F)adzr$LeI|INySF1cQm%p$<# z%2L&obaL32$jec|kH<}xLOP|E5NZ0->A1H88e~)B#9AXv2ZFSPK&)91NzBMLRVWRZ zXqqavY?7-qvN=#AGkiQ;%gBJs<#OioK}?9IXewP6P>uI$jM9M(yFqw(E5lpu3Tb2| z!Y6tYdEitJziax??BwsY6NzPO2bbWnK#Iu86jl!AdLH}wmGd6KCt)eql~Oc&|Ibzb$PN-J8c8BJh#FyV#f~ k&o3O`T8sa9v-|4Lfu*hWMC$3UZyU2cQxBFM@9up03;Z$p)c^nh literal 0 HcmV?d00001