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,
|
lib,
|
||||||
config,
|
config,
|
||||||
niveumPackages,
|
niveumPackages,
|
||||||
|
unstablePackages,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
@@ -107,7 +108,6 @@ in {
|
|||||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||||
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
|
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
|
||||||
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
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
|
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
|
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
}: let
|
}: let
|
||||||
worldradio = pkgs.callPackage ../packages/worldradio.nix {};
|
worldradio = pkgs.callPackage ../packages/worldradio.nix {};
|
||||||
|
|
||||||
|
externalNetwork = import ../lib/external-network.nix;
|
||||||
|
|
||||||
zoteroStyle = {
|
zoteroStyle = {
|
||||||
name,
|
name,
|
||||||
sha256,
|
sha256,
|
||||||
@@ -108,6 +110,11 @@ in {
|
|||||||
anki-bin # flashcards
|
anki-bin # flashcards
|
||||||
jbofihe # lojbanic software
|
jbofihe # lojbanic software
|
||||||
unstablePackages.zoom-us # video conferencing
|
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
|
alejandra # nix formatter
|
||||||
pdfgrep # search in pdf
|
pdfgrep # search in pdf
|
||||||
pdftk # pdf toolkit
|
pdftk # pdf toolkit
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
unstablePackages,
|
||||||
...
|
...
|
||||||
} @ args: let
|
} @ args: let
|
||||||
# config cannot be declared in the input attribute set because that would
|
# 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 = _: {
|
configure = _: {
|
||||||
init = "/exec -oc cat ${setFile}";
|
init = "/exec -oc cat ${setFile}";
|
||||||
|
|
||||||
@@ -169,7 +170,7 @@ in
|
|||||||
name = "weechat-configured";
|
name = "weechat-configured";
|
||||||
paths = [
|
paths = [
|
||||||
wrapper
|
wrapper
|
||||||
pkgs.weechat
|
unstablePackages.weechat
|
||||||
];
|
];
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
ln -s ${setFile} $out/weechat.set
|
ln -s ${setFile} $out/weechat.set
|
||||||
|
|||||||
@@ -2,11 +2,15 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
|
unstablePackages,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (import ../../lib) kieran;
|
inherit (import ../../lib) kieran;
|
||||||
weechatHome = "/var/lib/weechat";
|
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 {
|
in {
|
||||||
systemd.services.weechat = let
|
systemd.services.weechat = let
|
||||||
tmux = pkgs.writers.writeDash "tmux" ''
|
tmux = pkgs.writers.writeDash "tmux" ''
|
||||||
@@ -118,6 +122,7 @@ in {
|
|||||||
alias.cmd.mod = "/quote omode $channel +o $nick";
|
alias.cmd.mod = "/quote omode $channel +o $nick";
|
||||||
relay = {
|
relay = {
|
||||||
port.weechat = 9000;
|
port.weechat = 9000;
|
||||||
|
port.api = apiPort;
|
||||||
network.password = "\${sec.data.relay_password}";
|
network.password = "\${sec.data.relay_password}";
|
||||||
};
|
};
|
||||||
filters = {
|
filters = {
|
||||||
@@ -178,6 +183,8 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [apiPort];
|
||||||
|
|
||||||
users.groups.weechat = {};
|
users.groups.weechat = {};
|
||||||
users.extraUsers.weechat = {
|
users.extraUsers.weechat = {
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user