feat(shell): prioritize bun global bin in bash/fish/zsh PATH

Merged
SH
5mo ago
+43-12

Summary

  • Add $HOME/.bun/install/global/node_modules/.bin as the highest-priority PATH entry in bash, fish, and zsh
  • Mirrors the existing pattern that prepends ~/.bun/bin, so global packages installed via bun install -g resolve from the actual node_modules .bin directory first
  • Updated locations: bash bashrcExtra + profileExtra + bash_env.sh, zsh envExtra + initContent, fish shellInit + loginShellInit + interactiveShellInit

Test plan

  • nix flake check --no-build passes
  • After make switch, echo $PATH in each shell shows ~/.bun/install/global/node_modules/.bin at the front
  • Globally bun add-ed CLIs still resolve as expected

Summary by cubic

Prepends $HOME/.bun/install/global/node_modules/.bin to PATH with highest priority in bash, zsh, and fish so global bun CLIs resolve first across interactive and login shells. Mirrors ~/.bun/bin precedence and ensures it wins over /opt/homebrew/bin on macOS.

  • Bug Fixes

    • Updated specs to assert the new PATH order and that bun globals win over Homebrew on macOS (bash/zsh/fish).
    • SSH config: switched IdentityFile to list type and forced * to use ~/.ssh/id_ed25519 with lib.mkForce to override @home-manager defaults.
    • Scoped llama-cpp Vulkan override to isDesktop for simpler platform handling.
  • Refactors

    • Nixfmt the SSH module header.