nix-shell -p nix-info --run "nix-info -m" --show-trace
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
at «string»:1:25:
1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (nix-info) ]; } ""
| ^
… while realising the context of a path
at «string»:1:18:
1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (nix-info) ]; } ""
| ^
… while evaluating anonymous lambda
at «string»:1:1:
1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (nix-info) ]; } ""
| ^
… from call site
nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos
is missing after nixos rebuild but I’m not aware of changing $NIX_PATH in any way. How to figure out what is making the manipulation?
Expectation is: you set an option to a value, then the default will not be used or merged.
This behaviour is inherint to the module system. If it would behave differently, you wouldn’t be able to use an enable-option, as its default false would always conflict with the manually set true.
for sure, you can see all character only as one string - then it would be ok, if this string is totally replaced
but if you look at the path/variables in the string - as user you only expect the variable to be modified which you have (explicitly) declared …
(some logic e.g. to check for the nixpkgs variable could make sense if that variables is always mandatory - else error )
There is only one default value. This default value is a single list.
Within that list, there are strings, which are opaque to the module system. The only way it was able to merge was by appending or prepending.
Though as your value and the default have different priorities, no merging happens at all, but your manually set value has a lower priority value and therefore replaces the default which has a high priority value.