.files/nix/homeModules/extra/tmux-fish-integration.nix
Léana 江 ebf8468807
tree-wide: format with nixfmt
Another saturday another useless formatter change.
It's my dotfiles, after all

alejandra doesn't handle c-style inline comments well.
2025-11-08 10:15:58 +08:00

37 lines
787 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"
'';
home.packages = with pkgs; [
tmux-sessionizer
];
}