feat: add tmux hm module

This commit is contained in:
matt1432 2023-10-18 14:54:24 -04:00
parent 45c94a4aff
commit 2be731d5d2
6 changed files with 26 additions and 29 deletions

View file

@ -46,8 +46,9 @@
imports = [
nur.hmModules.nur
./modules/bash
./modules/git
./modules/git.nix
./modules/neovim
./modules/tmux.nix
./hostvars.nix
({ osConfig, ... }: {

View file

@ -22,28 +22,4 @@
];
};
};
programs = {
# TODO: install plugins through nix
tmux = {
enable = true;
keyMode = "vi";
terminal = "screen-256color";
newSession = true;
historyLimit = 30000;
extraConfig = ''
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
set -g mouse on
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
set -g @plugin 'dracula/tmux'
run 'bash -c "$HOME/.tmux/plugins/tpm/tpm ||
${pkgs.git}/bin/git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm &&
$HOME/.tmux/plugins/tpm/tpm"'
'';
};
};
}

24
common/modules/tmux.nix Normal file
View file

@ -0,0 +1,24 @@
{ pkgs, ... }: {
programs = {
tmux = {
enable = true;
keyMode = "vi";
terminal = "screen-256color";
newSession = true;
historyLimit = 30000;
plugins = with pkgs.tmuxPlugins; [
dracula
];
extraConfig = ''
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
set -g mouse on
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
bind -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
'';
};
};
}

View file

@ -28,8 +28,6 @@
"libvirtd"
];
};
# TODO: use hm for tmux
home-manager.users = {
matt = {

View file

@ -31,8 +31,6 @@
"libvirtd"
];
};
# TODO: use hm for tmux
home-manager.users = {
matt = {
imports = [