summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-05-17 22:36:07 +0200
committerlassulus <lassulus@lassul.us>2022-05-17 22:36:07 +0200
commit57464602911efcfac2c5465fba5b9b6bc1b44156 (patch)
tree3588b58bb7bd00c14fce1d9087248792839b538e
parentac50726777d4bc3c7552d0e5841804348f6a30f8 (diff)
ponte.r: add matterbridge service
-rw-r--r--krebs/1systems/ponte/config.nix1
-rw-r--r--krebs/2configs/matterbridge.nix49
2 files changed, 50 insertions, 0 deletions
diff --git a/krebs/1systems/ponte/config.nix b/krebs/1systems/ponte/config.nix
index 1e25ca9bf..8250ebad9 100644
--- a/krebs/1systems/ponte/config.nix
+++ b/krebs/1systems/ponte/config.nix
@@ -4,6 +4,7 @@
./hw.nix
<stockholm/krebs>
<stockholm/krebs/2configs>
+ <stockholm/krebs/2configs/matterbridge.nix>
];
krebs.build.host = config.krebs.hosts.ponte;
diff --git a/krebs/2configs/matterbridge.nix b/krebs/2configs/matterbridge.nix
new file mode 100644
index 000000000..9c0908def
--- /dev/null
+++ b/krebs/2configs/matterbridge.nix
@@ -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"
+ }
+ ];
+ }
+ ];
+ });
+ };
+}