Should Nix installations include $HOME/.nix-defexpr/channels in the NIX_PATH? Should it appear before or after root channels?
nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
$ nix-channel --list
nixpkgsunstable https://nixos.org/channels/nixpkgs-unstable
$ nix-env -iA nixpkgsunstable.git
installing 'git-minimal-2.16.2'
$ nix-shell -p nixpkgsunstable.git
error: undefined variable 'nixpkgsunstable' at (string):1:94
(use '--show-trace' to show detailed location information)
$ nix-shell '<nixpkgsunstable>' -p git
error: file 'nixpkgsunstable' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:94
(use '--show-trace' to show detailed location information)
$ nix-build '<nixpkgsunstable>' -A git
error: file 'nixpkgsunstable' was not found in the Nix search path (add it using $NIX_PATH or -I)
vs:
$ export NIX_PATH=$NIX_PATH:$HOME/.nix-defexpr/channels
$ nix-env -iA nixpkgsunstable.git
replacing old 'git-minimal-2.16.2'
installing 'git-minimal-2.16.2'
$ nix-shell -p nixpkgsunstable.git
error: undefined variable 'nixpkgsunstable' at (string):1:94
(use '--show-trace' to show detailed location information)
$ nix-shell '<nixpkgsunstable>' -p git
[nix-shell:~]$ exit
$ nix-build '<nixpkgsunstable>' -A git
/nix/store/jaani1kx4a4kvz11d0myfkjjiiklfl7w-git-2.16.2
With this configuration, and the explicitly specified nixpkgs, is it possible for users to override nixpkgs without redefining the NIX_PATH? Does it matter?
Should Nix installations include
$HOME/.nix-defexpr/channelsin the NIX_PATH? Should it appear before or after root channels?vs:
With this configuration, and the explicitly specified nixpkgs, is it possible for users to override
nixpkgswithout redefining the NIX_PATH? Does it matter?