summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/matterbridge.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/2configs/matterbridge.nix')
-rw-r--r--krebs/2configs/matterbridge.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/krebs/2configs/matterbridge.nix b/krebs/2configs/matterbridge.nix
new file mode 100644
index 000000000..a68aa292c
--- /dev/null
+++ b/krebs/2configs/matterbridge.nix
@@ -0,0 +1,40 @@
+{ 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;
+ };
+ };
+ gateway = [
+ {
+ name = "krebs-bridge";
+ enable = true;
+ inout = [
+ {
+ account = "irc.hackint";
+ channel = "#krebs";
+ }
+ {
+ account = "telegram.krebs";
+ channel = "-330372458";
+ }
+ ];
+ }
+ ];
+ });
+ };
+}