unset `NIX_PATH` causes nixos-shell to not work
MatthewCroughan opened this issue · 0 comments
MatthewCroughan commented
If you use nixos-shell
with an unset NIX_PATH
it doesn't work, but maybe it should follow the pkgs.path
of the nixosConfiguration it's invoking, especially when this is fully defined in a flake and ready to evaluate.
❯ nixos-shell --flake .#binfmt-sdk-nixos-shell
warning: Git tree '/home/matthew/git/mobile-nixos-templates' is dirty
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
at /nix/store/j7x4a64zsw8fg7kq6sdq3vbcnx48wg1k-nixos-shell-1.0.0/share/nixos-shell.nix:1:13:
1| { nixpkgs ? <nixpkgs>
| ^
2| , system ? builtins.currentSystem
(use '--show-trace' to show detailed location information)