# A custom LD_LIBRARY_PATH is needed to access in `getent passwd`
# the systemd's entry about the DynamicUser=
environment.LD_LIBRARY_PATH = config.system.nssModules.path;
- serviceConfig = let tmux = "/home/julm/src/tmux/result/bin/tmux"; in {
+ unitConfig = {
+ RefuseManualStart = true;
+ };
+ serviceConfig = {
Type = "notify";
#GuessMainPID = true;
- ExecStart = "${tmux} -v -D -f /var/lib/tmux/%i/.config/tmux/tmux.conf -f ${pkgs.writeText "tmux.conf" ''
+ ExecStart = "${pkgs.tmux} -v -D -f /var/lib/tmux/%i/.config/tmux/tmux.conf -f ${pkgs.writeText "tmux.conf" ''
set-option -g default-shell ${pkgs.runtimeShell}
#set-option -g exit-empty off
new-session -d
run-shell -b "systemd-notify --ready"
''}";
NotifyAccess = "all";
- RefuseManualStart = true;
#RuntimeDirectory = ["tmux/%i"];
#RuntimeDirectoryMode = "755";
StateDirectory = ["tmux/%i"];
#TimeoutSec = 5;
ExecStop = [
# Send CTRL+u to clear the input line before /quit
- #"-${tmux} -L %p send-keys -t irssi:0 C-u"
- #"-${tmux} -L %p send-keys -t irssi:0 /quit Enter"
+ #"-${pkgs.tmux} -L %p send-keys -t irssi:0 C-u"
+ #"-${pkgs.tmux} -L %p send-keys -t irssi:0 /quit Enter"
# Sending /quit to irssi is asynchronous, so wait for irssi to exit
# before killing the session in tmux
#(pkgs.writeShellScript "stop-irssi" ''
# timeout 3 tail --pid=$(cat %t/irssi.pid || echo 0) -f /dev/null
#'')
- #"-${tmux} -L %p kill-session -t irssi-%i"
+ #"-${pkgs.tmux} -L %p kill-session -t irssi-%i"
];
WorkingDirectory = "/var/lib/tmux/%i";
DynamicUser = true;