kidonng / nix.fish

β„οΈπŸŸ Fish plugin for Nix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

β„οΈπŸŸ Nix.fish

Fish port of ~/.nix-profile/etc/profile.d/nix.sh which sets up Nix environment.

Installation

  • plug.fish

    plug install kidonng/nix.fish
  • Fisher

    fisher install kidonng/nix.fish

Differences from nix-env.fish

Works with nix shell / nix-shell

Nix.fish checks $PATH for /nix/store/* and respects $fish_user_paths thus:

  • $PATH is always set up correctly
  • conf.d, function and completion scripts are loaded on the fly.

Faster shell startup

Nix.fish is pure fish, while nix-env.fish starts Bash to capture environment variables and hence slower.

Doesn't replicate __fish_build_paths.fish

__fish_build_paths.fish handles vendored fish scripts from Nixpkgs. It's error-prone to replicate its logic when it is present.

If fish isn't installed from Nixpkgs, consider nix-env.fish instead.

About

β„οΈπŸŸ Fish plugin for Nix

License:MIT License


Languages

Language:Shell 100.0%