Use gateways in mattermost config instead of samechannelgateway #1

Merged
betamike merged 1 commits from :bridge-gateways into master 2023-02-16 14:04:40 +00:00
Showing only changes of commit 050f3bd7cb - Show all commits

View File

@ -38,6 +38,53 @@ in {
];
services.matterbridge = let
channels = [
"a-rusty-venture"
"anime"
"bossin_around"
"bot-test"
"bridge-test"
"cryptic-bunker"
"cryptic-chat"
"cryptic-net-public"
"dumbathon"
"europe"
"generic-gaming"
"get-rich-fast"
"gnv"
"golang"
"jerbs"
"main_linux"
"minecraft"
"nyc"
"omg-berks"
"sf"
"smersh"
"to-the-moon-and-back"
"travel"
"tunes"
];
gateways = lib.strings.concatMapStrings (channel: ''
[[gateway]]
name="${channel}-gateway"
enable=true
[[gateway.inout]]
account="matrix.wafflefarm"
channel="#${channel}:waffle.farm"
[[gateway.inout]]
account="slack.cryptic"
channel="${channel}"
[[gateway.inout]]
account="discord.cryptic"
channel="${channel}"
'') channels;
config-file = pkgs.writeText "matterbridge.toml" ''
[discord.cryptic]
Token="${secrets.matterbridge.discord2.token}"
@ -60,51 +107,7 @@ SpoofUsername=true
PreserveThreading=true
KeepQuotedReply=false
[[gateway]]
name="testgateway"
enable=true
[[gateway.inout]]
account="matrix.wafflefarm"
channel="#bridge-test:waffle.farm"
[[gateway.inout]]
account="slack.cryptic"
channel="bridge-test"
[[gateway.inout]]
account="discord.cryptic"
channel="bridge-test"
[[samechannelgateway]]
name="same-channel-gw"
enable = true
accounts = [ "slack.cryptic", "discord.cryptic" ]
channels = [
"a-rusty-venture",
"anime",
"bossin_around",
"bot-test",
"cryptic-bunker",
"cryptic-chat",
"cryptic-net-public",
"dumbathon",
"europe",
"generic-gaming",
"get-rich-fast",
"gnv",
"golang",
"jerbs",
"main_linux",
"minecraft",
"nyc",
"omg-berks",
"sf",
"smersh",
"to-the-moon-and-back",
"travel",
"tunes"
]
${gateways}
'';
in {
enable = true;