nix/home/netty-worktree.nix
Harivansh Rathi 8ad1784a82 Add netty worktree helpers
Add netty-specific worktree helper commands and a zsh wrapper that creates sibling worktrees and cds into them.

Also split script packaging so Darwin keeps the existing wt integration while netty gets git-worktree-based helpers.

Co-authored-by: Codex <noreply@openai.com>
2026-03-30 16:37:46 +00:00

23 lines
475 B
Nix

{
config,
lib,
pkgs,
...
}: let
customScripts = import ../scripts {inherit config lib pkgs;};
in {
home.packages = builtins.attrValues customScripts.nettyPackages;
programs.zsh.initContent = lib.mkAfter ''
wtc() {
if [[ $# -ne 1 ]]; then
printf 'usage: wtc <worktree-name>\n' >&2
return 1
fi
local worktree_path
worktree_path=$(command wt-create "$1") || return
cd -- "$worktree_path" || return
}
'';
}