.files/nix/homeModules/extra/tmux-fish-integration.nix

30 lines
792 B
Nix

# 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
];
}