.files/nix/homeModules/common/tmux/default.nix
Léana 江 ebf8468807
tree-wide: format with nixfmt
Another saturday another useless formatter change.
It's my dotfiles, after all

alejandra doesn't handle c-style inline comments well.
2025-11-08 10:15:58 +08:00

17 lines
550 B
Nix

{
pkgs,
lib,
...
}:
{
programs.tmux.extraConfig =
builtins.readFile ./tmux.conf
+ lib.optionalString pkgs.stdenv.isDarwin ''
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'pbcopy'
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'pbcopy'
''
+ lib.optionalString pkgs.stdenv.isLinux ''
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
'';
}