ponte.r: add matterbridge service

This commit is contained in:
lassulus 2022-05-17 22:36:07 +02:00
parent ac50726777
commit 5746460291
2 changed files with 50 additions and 0 deletions

View File

@ -4,6 +4,7 @@
./hw.nix ./hw.nix
<stockholm/krebs> <stockholm/krebs>
<stockholm/krebs/2configs> <stockholm/krebs/2configs>
<stockholm/krebs/2configs/matterbridge.nix>
]; ];
krebs.build.host = config.krebs.hosts.ponte; krebs.build.host = config.krebs.hosts.ponte;

View File

@ -0,0 +1,49 @@
{ pkgs, lib, ... }: {
services.matterbridge = {
enable = true;
configPath = let
bridgeBotToken = lib.strings.fileContents <secrets/telegram.token>;
in
toString ((pkgs.formats.toml {}).generate "config.toml" {
general = {
RemoteNickFormat = "[{NICK}] ";
Charset = "utf-8";
};
telegram.krebs.Token = bridgeBotToken;
irc = let
Nick = "ponte";
in {
hackint = {
Server = "irc.hackint.org:6697";
UseTLS = true;
inherit Nick;
};
};
mumble.lassulus = {
Server = "lassul.us:64738";
Nick = "krebs_bridge";
SkipTLSVerify = true;
};
gateway = [
{
name = "krebs-bridge";
enable = true;
inout = [
{
account = "irc.hackint";
channel = "#krebs";
}
{
account = "telegram.krebs";
channel = "-330372458";
}
{
account = "mumble.lassulus";
channel = 6; # "nixos"
}
];
}
];
});
};
}