diff --git a/home/darwin.nix b/home/darwin.nix index 0bb2f9a..ba014f6 100644 --- a/home/darwin.nix +++ b/home/darwin.nix @@ -18,8 +18,8 @@ ../modules/zoxide ../modules/fish ../modules/nvim + ../modules/tmux ../modules/ghostty - ../modules/zellij ../modules/lazygit ]; diff --git a/hosts/dnsc-air/default.nix b/hosts/dnsc-air/default.nix index 0ba70db..2840566 100644 --- a/hosts/dnsc-air/default.nix +++ b/hosts/dnsc-air/default.nix @@ -27,9 +27,7 @@ # Device specific overlays # Overlays for all devices are defined # in modules/default.nix - nixpkgs.overlays = [ - inputs.zellij-switch.overlays.default - ]; + nixpkgs.overlays = []; # System Packages environment.systemPackages = lib.mkAfter ( @@ -38,8 +36,6 @@ yt-dlp fnm devenv - zellij - zellij-switch rsync ] ); diff --git a/modules/tmux/default.nix b/modules/tmux/default.nix new file mode 100644 index 0000000..2c1b962 --- /dev/null +++ b/modules/tmux/default.nix @@ -0,0 +1,52 @@ +{ config, pkgs, ... }: + +{ + programs.tmux = { + enable = true; + baseIndex = 1; + clock24 = true; + disableConfirmationPrompt = true; + mouse = true; + newSession = true; + prefix = "C-b"; + shell = "${pkgs.fish}/bin/fish"; + terminal = "screen-256color"; + plugins = with pkgs; [ + { + plugin = tmuxPlugins.resurrect; + extraConfig = '' + set -g @resurrect-strategy-nvim 'session' + set -g @resurrect-capture-pane-contents 'on' + ''; + } + { + plugin = tmuxPlugins.continuum; + extraConfig = '' + set -g @continuum-restore 'on' + set -g @continuum-boot 'on' + set -g @continuum-save-interval '10' + ''; + } + ] + extraConfig = '' + unbind % + bind | split-window -h + unbind '"' + bind - split-window -v + + bind r source-file ~/.tmux.conf \; display "Config reloaded!" + + bind h select-pane -L + bind j select-pane -D + bind k select-pane -U + bind l select-pane -R + + bind -r H resize-pane -L 5 + bind -r J resize-pane -D 5 + bind -r K resize-pane -U 5 + bind -r L resize-pane -R 5 + + bind ? list-keys -a + ''; + } +}