add tmux config to work in a direnv

This commit is contained in:
Trolli Schmittlauch 2019-05-14 15:33:26 +02:00
parent 70619ef955
commit c590ad1f98

View file

@ -270,4 +270,21 @@ in
{ enable = true; { enable = true;
enableSshSupport = true; enableSshSupport = true;
}; };
programs.tmux = {
enable = true;
keyMode = "vi";
extraConfig =
# for direnv not messing up the environment
''set-option -g update-environment "DIRENV_DIFF DIRENV_DIR DIRENV_WATCHES"
set-environment -gu DIRENV_DIFF
set-environment -gu DIRENV_DIR
set-environment -gu DIRENV_WATCHES
set-environment -gu DIRENV_LAYOUT
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel'';
terminal = "screen-256color";
};
} }