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:
@@ -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
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user