Loading
nixos/tmux: use idempotent new-session to avoid duplicate sessions
When both NixOS programs.tmux and home-manager tmux configs set newSession = true, tmux would create two sessions on startup since both /etc/tmux.conf and ~/.config/tmux/tmux.conf contain the new-session command. Change new-session to new-session -A -s 0, which attaches to session "0" if it exists, otherwise creates it. This makes the command idempotent so multiple configs can safely enable newSession.