diff --git a/nix/configurations/vanadium.nix b/nix/configurations/vanadium.nix index 6745b516..42baad8e 100644 --- a/nix/configurations/vanadium.nix +++ b/nix/configurations/vanadium.nix @@ -163,6 +163,8 @@ in ../homeModules/common/tealdeer.nix ../homeModules/common/user-nixconf.nix + ../homeModules/extra/tmux-fish-integration.nix + # # Extern modules # diff --git a/nix/homeModules/common/fish/default.nix b/nix/homeModules/common/fish/default.nix index 81a5b2ca..11152a9a 100644 --- a/nix/homeModules/common/fish/default.nix +++ b/nix/homeModules/common/fish/default.nix @@ -12,20 +12,7 @@ in { ./aliasesAbbrs.nix ]; - # - # tmux sessionizer - # - home.sessionVariables = lib.mapAttrs (_: path: config.home.homeDirectory + "/${path}") { - REPO_PATH = "r"; - PLAYGROUND_PATH = "pg"; - WORKTREE_PATH = "wt"; - }; - programs.direnv.config.whitelist.prefix = [(config.home.sessionVariables.REPO_PATH + "/leana8959")]; - programs.tmux.extraConfig = lib.mkBefore '' - # sessionizer binds - bind -n C-f run-shell "tmux new-window tmux-sessionizer" - bind s run-shell "tmux-last" - ''; + # TODO: do not set this here programs.kitty.settings.shell = ''${fishExe}''; # diff --git a/nix/homeModules/extra/tmux-fish-integration.nix b/nix/homeModules/extra/tmux-fish-integration.nix new file mode 100644 index 00000000..6424ae35 --- /dev/null +++ b/nix/homeModules/extra/tmux-fish-integration.nix @@ -0,0 +1,30 @@ +# This module integrates tmux with fish +{pkgs, lib, config, ...}: { + + assertions = [ + { assertion = config.programs.fish.enable; + message = "Should have fish enabled"; + } + { assertion = config.programs.tmux.enable; + message = "Should have tmux enabled"; + } + ]; + + home.sessionVariables = lib.mapAttrs (_: path: config.home.homeDirectory + "/${path}") { + REPO_PATH = "r"; + PLAYGROUND_PATH = "pg"; + WORKTREE_PATH = "wt"; + }; + + programs.direnv.config.whitelist.prefix = [(config.home.sessionVariables.REPO_PATH + "/leana8959")]; + programs.tmux.extraConfig = lib.mkBefore '' + # sessionizer binds + bind -n C-f run-shell "tmux new-window tmux-sessionizer" + bind s run-shell "tmux-last" + ''; + + home.packages = with pkgs; [ + tmux-sessionizer + ]; + +}