mio-ops/profiles/tmux.nix

47 lines
1.2 KiB
Nix
Raw Normal View History

2020-01-07 01:00:06 +00:00
# Common configuration for Tmux users
{
2022-03-07 14:26:15 +00:00
config,
pkgs,
...
2022-04-20 02:53:30 +00:00
}: let
cfg = config.programs.tmux;
in {
2020-01-07 01:00:06 +00:00
programs = {
2022-03-07 14:26:15 +00:00
tmux = {
# Terminal multiplexer required by byobu
2020-01-07 01:00:06 +00:00
enable = true;
aggressiveResize = true;
clock24 = true;
2020-04-21 08:23:43 +00:00
extraConfig = ''
2022-04-20 02:53:30 +00: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 02:07:53 +00:00
2020-06-04 07:23:10 +00:00
# Bind home and end keys:
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
2022-04-20 02:53:30 +00: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 01:00:06 +00:00
'';
2021-11-16 04:57:23 +00:00
keyMode = "vi";
2020-12-31 02:07:53 +00:00
newSession = true;
2021-11-16 04:57:23 +00:00
shortcut = "b";
terminal = "screen-256color";
2020-01-07 01:00:06 +00:00
};
};
environment.systemPackages = with pkgs; [
2022-04-20 02:53:30 +00:00
powerline
2020-12-31 02:07:53 +00:00
tmuxPlugins.continuum
2022-04-20 02:53:30 +00:00
tmuxPlugins.onedark-theme
2021-08-07 06:32:17 +00:00
tmuxPlugins.resurrect
tmuxPlugins.sensible
tmuxPlugins.tmux-fzf
tmuxPlugins.yank
2020-01-07 01:00:06 +00:00
];
}