Open nbraud opened 1 month ago
Setting nix-path
the other way around so nixos-config=...
is the last item, does not really help: the warning about a non-existent path entry disappears, but the build fails with the same error:
file 'nixpkgs/nixos' was not found in the Nix search path
PS: the breakage also concided with setting nix.channel.enable = false;
, which for some reasons sets an empty nix-path
in the config file... and that (currently) takes priority over NIX_PATH
. I will open an issue in nixpkgs for this.
It's still unclear why that would not be overriden by the cmdline options, though.
This is a duplicate of https://github.com/NixOS/nix/issues/9574
Thanks for the fix, @fricklerhandwerk ! I'll close this once I confirm it solves the issue, if that's OK
Describe the bug
Following a recent update, building my NixOS systems fails with the following:
nixpkgs
is present in the nix path, under3rd-party/
.Steps To Reproduce
Run
nix-build --option nix-path nixos-config=...:nixpkgs=... -A system '<nixpkgs/nixos>'
Expected behavior
The system is built, as on previous versions.
nix-env --version
outputnix-env (Nix) 2.18.4
Additional context
My script previously set the
NIX_PATH
environment variable, which was similarly broken, and I switched to setting--option nix-path
after finding #10246; since settingnix-path
in parameters does not work either, this is likely a distinct bug.Using
-I
did not work either, nor did explicitely addingnixpkgs=.../3rd-party/nixpkgs
to the path.Hard-conding the path to
nixpkgs/nixos
in the call tonix-build
gives a warning suggesting the path is not being parsed correctly anymore:Priorities
Add :+1: to issues you find important.