hm: isolate tmux-sessionizer configuration

This commit is contained in:
Primrose 2025-06-04 19:18:25 +02:00
parent 539e0ec5cc
commit 57e9ef2070
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
3 changed files with 33 additions and 14 deletions

View file

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