mio-ops/profiles/tmux.nix

47 lines
1.2 KiB
Nix
Raw Normal View History

2020-01-07 11:00:06 +10:00
# Common configuration for Tmux users
{
2022-03-08 00:26:15 +10:00
config,
pkgs,
...
2022-04-20 12:53:30 +10:00
}: let
cfg = config.programs.tmux;
in {
2020-01-07 11:00:06 +10:00
programs = {
2022-03-08 00:26:15 +10:00
tmux = {
# Terminal multiplexer required by byobu
2020-01-07 11:00:06 +10:00
enable = true;
aggressiveResize = true;
clock24 = true;
2020-04-21 18:23:43 +10:00
extraConfig = ''
2022-04-20 12:53:30 +10:00
POWERLINE_COMMAND="/run/current-system/sw/bin/powerline"
POWERLINE_CONFIG_COMMAND="/run/current-system/sw/bin/powerline-config"
run-shell "/run/current-system/sw/bin/powerline-daemon -q"
source /run/current-system/sw/share/tmux/powerline.conf
2020-12-31 12:07:53 +10:00
2020-06-04 17:23:10 +10:00
# Bind home and end keys:
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
2022-04-20 12:53:30 +10:00
# Run tmux plugins in NixOS
run-shell ${pkgs.tmuxPlugins.onedark-theme}/share/tmux-plugins/onedark-theme/tmux-onedark-theme.tmux
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
2020-01-07 11:00:06 +10:00
'';
2021-11-16 14:57:23 +10:00
keyMode = "vi";
2020-12-31 12:07:53 +10:00
newSession = true;
2021-11-16 14:57:23 +10:00
shortcut = "b";
terminal = "screen-256color";
2020-01-07 11:00:06 +10:00
};
};
environment.systemPackages = with pkgs; [
2022-04-20 12:53:30 +10:00
powerline
2020-12-31 12:07:53 +10:00
tmuxPlugins.continuum
2022-04-20 12:53:30 +10:00
tmuxPlugins.onedark-theme
2021-08-07 16:32:17 +10:00
tmuxPlugins.resurrect
tmuxPlugins.sensible
tmuxPlugins.tmux-fzf
tmuxPlugins.yank
2020-01-07 11:00:06 +10:00
];
}