Migrate Tmux config to Nix

This commit is contained in:
2025-03-28 22:50:43 -07:00
parent 8b284dc553
commit 1a044a5256
3 changed files with 35 additions and 2 deletions

View File

@@ -23,7 +23,6 @@
htop htop
ncdu ncdu
ripgrep ripgrep
tmux
nerd-fonts.fira-code nerd-fonts.fira-code
roboto-mono roboto-mono
]; ];
@@ -38,6 +37,7 @@
./modules/tealdeer.nix ./modules/tealdeer.nix
./modules/work.nix ./modules/work.nix
./modules/dotfiles.nix ./modules/dotfiles.nix
./modules/tmux.nix
]; ];
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;

View File

@@ -6,7 +6,6 @@ let dotdir = "${config.home.homeDirectory}/.dotfiles";
in in
{ {
xdg.configFile = { xdg.configFile = {
"tmux/tmux.conf".source = ../../tmux.conf;
"vim/vimrc".source = ../../vimrc; "vim/vimrc".source = ../../vimrc;
"ideavim/ideavimrc".source = ../../ideavimrc; "ideavim/ideavimrc".source = ../../ideavimrc;
# "doom".source = mkOutOfStoreSymlink "${dotdir}/doom"; # "doom".source = mkOutOfStoreSymlink "${dotdir}/doom";

34
nix/modules/tmux.nix Normal file
View File

@@ -0,0 +1,34 @@
{ config, lib, pkgs, ... }:
{
programs.tmux = {
enable = true;
mouse = true;
shortcut = "s";
baseIndex = 1;
keyMode = "vi";
customPaneNavigationAndResize = true;
plugins = with pkgs; [
tmuxPlugins.sensible
];
extraConfig = ''
# Splitting panes
bind - split-window -v -c '#{pane_current_path}'
bind \\ split-window -h -c '#{pane_current_path}'
# New window at current path
bind c new-window -c '#{pane_current_path}'
# Break pane into new window
bind b break-pane -d
# Status bar themeing
set-option -g status-bg '#666666'
set-option -g status-fg '#aaaaaa'
# Toggle mouse-mode
bind m set-window-option mouse
'';
};
}