1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

weechat: use new api relay

This commit is contained in:
2024-06-26 19:35:05 +02:00
parent b21c6adccc
commit 5a9dc34ee8
4 changed files with 19 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
lib,
config,
niveumPackages,
unstablePackages,
inputs,
...
}: let
@@ -107,7 +108,6 @@ 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
};

View File

@@ -9,6 +9,8 @@
}: let
worldradio = pkgs.callPackage ../packages/worldradio.nix {};
externalNetwork = import ../lib/external-network.nix;
zoteroStyle = {
name,
sha256,
@@ -108,6 +110,11 @@ in {
anki-bin # flashcards
jbofihe # lojbanic software
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'
'')
alejandra # nix formatter
pdfgrep # search in pdf
pdftk # pdf toolkit

View File

@@ -1,6 +1,7 @@
{
pkgs,
lib,
unstablePackages,
...
} @ args: let
# config cannot be declared in the input attribute set because that would
@@ -136,7 +137,7 @@
))
);
weechat = pkgs.weechat.override {
weechat = unstablePackages.weechat.override {
configure = _: {
init = "/exec -oc cat ${setFile}";
@@ -169,7 +170,7 @@ in
name = "weechat-configured";
paths = [
wrapper
pkgs.weechat
unstablePackages.weechat
];
postBuild = ''
ln -s ${setFile} $out/weechat.set

View File

@@ -2,11 +2,15 @@
lib,
pkgs,
config,
unstablePackages,
...
}: let
inherit (import ../../lib) kieran;
weechatHome = "/var/lib/weechat";
weechat-declarative = pkgs.callPackage ../../packages/weechat-declarative.nix {};
apiPort = 8002;
weechat-declarative = pkgs.callPackage ../../packages/weechat-declarative.nix {
inherit unstablePackages;
};
in {
systemd.services.weechat = let
tmux = pkgs.writers.writeDash "tmux" ''
@@ -118,6 +122,7 @@ in {
alias.cmd.mod = "/quote omode $channel +o $nick";
relay = {
port.weechat = 9000;
port.api = apiPort;
network.password = "\${sec.data.relay_password}";
};
filters = {
@@ -178,6 +183,8 @@ in {
};
};
networking.firewall.allowedTCPPorts = [apiPort];
users.groups.weechat = {};
users.extraUsers.weechat = {
useDefaultShell = true;