When I run nix-shell -p nix-info --run "nix-info -m"
(or any nix-shell
command in general) I’m getting the following error:
error:
… <borked>
at «none»:0: (source not available)
… while calling the 'import' builtin
at «string»:1:18:
1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (nix-info) ]; } ""
| ^
(stack trace truncated; use '--show-trace' to show the full trace)
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
at «none»:0: (source not available)
My User’s NIX_PATH
env variable has the following value:
/Users/user/.nix-defexpr/channels:darwin-config=/Users/user/.nixpkgs/darwin-configuration.nix:/nix/var/nix/profiles/per-user/root/channels
For root (sudo sh -c 'echo $NIX_PATH'
) the env variable value is empty.
The output of nix-channel --list
is empty both for user and root.
How can I investigate the issue? I’m suspicious of the nix-channels being empty, but I haven’t changed any configuration regarding that, I’ve installed nix via Determinate Nix Installer and I’m using nix-darwin with Home Manager plugin and all packages get installed with no problems when I run darwin-rebuild switch --flake ~/.config/nix-darwin
.