From 904cc4401e19f20693e62ab6a1946c4790a30d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Tue, 1 Oct 2024 21:03:33 +0200 Subject: [PATCH] weechat: use relay instead of API --- configs/default.nix | 1 + configs/packages.nix | 1 - configs/telegram-bots/tlg-wotd.nix | 1 - systems/makanek/weechat.nix | 10 ++++------ 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/configs/default.nix b/configs/default.nix index f41f4eb..8dc98ed 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -108,6 +108,7 @@ in { tmux = "${pkgs.tmux}/bin/tmux -2"; sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv"; zathura = swallow "${pkgs.zathura}/bin/zathura"; + im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM"; yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio }; diff --git a/configs/packages.nix b/configs/packages.nix index e094dd9..1dd7de0 100644 --- a/configs/packages.nix +++ b/configs/packages.nix @@ -112,7 +112,6 @@ in { jbofihe # lojbanic software unstablePackages.aider-chat # unstablePackages.zoom-us # video conferencing - unstablePackages.weechat (pkgs.writers.writeDashBin "im" '' weechat_password=$(${pkgs.pass}/bin/pass weechat) exec ${unstablePackages.weechat}/bin/weechat -t -r '/mouse enable; /remote add makanek http://${externalNetwork.makanek}:8002 -password='"$weechat_password"'; /remote connect makanek' diff --git a/configs/telegram-bots/tlg-wotd.nix b/configs/telegram-bots/tlg-wotd.nix index 81292cd..1eedf62 100644 --- a/configs/telegram-bots/tlg-wotd.nix +++ b/configs/telegram-bots/tlg-wotd.nix @@ -7,7 +7,6 @@ }: { systemd.services.telegram-bot-tlg-wotd = { enable = true; - wantedBy = ["multi-user.target"]; wants = ["network-online.target"]; startAt = "9:30"; path = [ pkgs.jq pkgs.curl pkgs.recode pkgs.deno pkgs.imagemagick pkgs.gawk pkgs.gnugrep pkgs.coreutils ]; diff --git a/systems/makanek/weechat.nix b/systems/makanek/weechat.nix index 8b2256d..6f5ab46 100644 --- a/systems/makanek/weechat.nix +++ b/systems/makanek/weechat.nix @@ -7,7 +7,6 @@ }: let inherit (import ../../lib) kieran; weechatHome = "/var/lib/weechat"; - apiPort = 8002; weechat-declarative = pkgs.callPackage ../../packages/weechat-declarative.nix { inherit unstablePackages; }; @@ -64,7 +63,7 @@ in { autoconnect = true; addresses = "irc.hackint.org/6697"; ipv6 = true; - ssl = true; + tls = true; autojoin = ["#eloop" "#krebs" "#the_playlist"]; sasl_mechanism = "plain"; sasl_username = nick; @@ -73,7 +72,7 @@ in { libera = { autoconnect = true; addresses = "irc.libera.chat/6697"; - ssl = true; + tls = true; autojoin = ["#haskell" "#fysi" "#binaergewitter" "#vim"]; sasl_mechanism = "plain"; sasl_username = nick; @@ -82,6 +81,7 @@ in { retiolum = { autoconnect = true; addresses = "irc.r"; + tls = false; autojoin = ["#xxx" "#brockman" "#flix"]; command = lib.concatStringsSep "\\;" [ "/oper admin aidsballs" @@ -96,6 +96,7 @@ in { news = { autoconnect = true; addresses = "news.r"; + tls = false; autojoin = ["#cook" "#drachengame" "#oepnv" "#kmeinung" "#memes"]; }; }; @@ -118,7 +119,6 @@ in { alias.cmd.mod = "/quote omode $channel +o $nick"; relay = { port.weechat = 9000; - port.api = apiPort; network.password = "\${sec.data.relay_password}"; }; filters = { @@ -179,8 +179,6 @@ in { }; }; - networking.firewall.allowedTCPPorts = [apiPort]; - users.groups.weechat = {}; users.extraUsers.weechat = { useDefaultShell = true;