nix/modules/home-manager/weechat-in-tmux-service.nix

29 lines
694 B
Nix
Raw Normal View History

2023-11-03 16:56:45 -05:00
{
pkgs,
outputs,
config,
...
}: let
socket = config.services.tmux-master-service.socket;
in {
imports = with outputs.homeManagerModules; [
tmux-master-service
];
systemd.user.services.weechat-in-tmux = {
Unit = {
Description = "weechat in tmux";
PartOf = "tmux-master.service";
After = ["tmux-master.service"];
};
Service = {
Type = "oneshot";
RemainAfterExit = "yes";
ExecStart = "${pkgs.tmux}/bin/tmux -S ${socket} new-session -d -s weechat ${pkgs.weechat}/bin/weechat";
ExecStop = "${pkgs.tmux}/bin/tmux -S ${socket} kill-session -t weechat";
};
Install = {
WantedBy = ["default.target"];
};
};
}