Files
nixpkgs/nixos/modules/programs/tmux.nix
Bernardo Meurer Costa b3b1a85370 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.
2025-12-06 07:02:22 +00:00

6.8 KiB