diff --git a/configs/default.nix b/configs/default.nix index fa1aafc..cc35b1f 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -88,7 +88,7 @@ in { 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"; + im = "${pkgs.openssh}/bin/ssh weechat@makanek -t screen -x weechat"; yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata --audio-format mp3 --audio-quality 0 -xic"; # Download with audio }; diff --git a/systems/makanek/weechat.nix b/systems/makanek/weechat.nix index 10e9411..58ce1ad 100644 --- a/systems/makanek/weechat.nix +++ b/systems/makanek/weechat.nix @@ -187,16 +187,19 @@ in after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; restartIfChanged = true; - path = [ pkgs.alacritty.terminfo ]; - environment.WEECHAT_HOME = weechatHome; + path = [ pkgs.alacritty.terminfo pkgs.screen ]; + environment = { + WEECHAT_HOME = weechatHome; + }; # preStart = "${pkgs.coreutils}/bin/rm $WEECHAT_HOME/*.conf"; - script = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat"; - preStop = "${tmux} kill-session -t IM"; + script = "${pkgs.screen}/bin/screen -S weechat -d -m ${weechat}/bin/weechat"; + preStop = "${pkgs.screen}/bin/screen -S weechat -X quit"; serviceConfig = { User = "weechat"; Group = "weechat"; RemainAfterExit = true; Type = "oneshot"; + RuntimeDirectory = "weechat-tmux"; }; }; @@ -210,7 +213,7 @@ in group = "weechat"; home = "/var/lib/weechat"; isSystemUser = true; - packages = [ pkgs.tmux ]; + packages = [ pkgs.screen ]; }; age.secrets.weechat-sec = {