Add tmux with config

This commit is contained in:
Evie Litherland-Smith 2023-08-15 14:44:19 +01:00
parent d9e94dbd0a
commit 536659ae74
3 changed files with 28 additions and 2 deletions

View file

@ -5,6 +5,7 @@
./git/default.nix
./ssh/default.nix
./tui/default.nix
./tmux/default.nix
./hyprland/default.nix
./firefox/default.nix
./zathura/default.nix

27
home/tmux/default.nix Normal file
View file

@ -0,0 +1,27 @@
{ pkgs, ... }:
{
programs.tmux = {
enable = true;
baseIndex = 1;
clock24 = true;
keyMode = "vi";
mouse = true;
secureSocket = true;
sensibleOnTop = true;
shortcut = "Space";
terminal = "xterm-256color";
plugins = with pkgs.tmuxPlugins; [ yank tmux-fzf catppuccin ];
extraConfig = ''
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
set -ga terminal-overrides ",*256col*,alacritty:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor"
# easy-to-remember split pane commands
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
'';
};
}

View file

@ -21,9 +21,7 @@ in
systemPackages = with pkgs; [ distrobox ];
shellAliases = {
nou = "sudo nixos-rebuild switch --flake \"${flakeURL}\"";
noul = "sudo nixos-rebuild switch --flake $HOME/.config/home-manager";
hms = "${pkgs.home-manager}/bin/home-manager switch --flake \"${flakeURL}\"";
hmsl = "${pkgs.home-manager}/bin/home-manager switch --flake $HOME/.config/home-manager";
};
};
networking.networkmanager.enable = true;