stockholm/krebs/2configs/matterbridge.nix
2024-05-31 18:00:03 +02:00

37 lines
943 B
Nix

{ pkgs, lib, config, ... }: {
services.matterbridge = {
enable = true;
configPath = let
bridgeBotToken = lib.strings.fileContents "${config.krebs.secret.directory}/telegram.token";
in
toString ((pkgs.formats.toml {}).generate "config.toml" {
general = {
RemoteNickFormat = "[{NICK}] ";
Charset = "utf-8";
};
telegram.krebs.Token = bridgeBotToken;
irc.hackint = {
Server = "irc.hackint.org:6697";
UseTLS = true;
Nick = "ponte";
};
gateway = [
{
name = "krebs-bridge";
enable = true;
inout = [
{
account = "irc.hackint";
channel = "#krebs";
}
{
account = "telegram.krebs";
channel = "-330372458";
}
];
}
];
});
};
}