Why exactly is modularily configured nixpkgs.config
discarded in the case an instance of nixpkgs
is assigned to nixpkgs.pkgs
?
Unfortunately the option description takes the rationale for granted. Which in my view it is absolutely not.
Especially, it seems to defy the powers of lazy evaluation since nixpkgs.config
never would depend on nixpkgs.pkgs
, would it?
Is it to make sure that a nixpkgs
version is also instantiated with that version’s config (for in case there where version incompatible differences in it’s configuration interface)? But why then nixpkgs.overlays
are preserved which potentially are subject to the same failure scenario?
Conclusively with the above reasoning this seems to work, indeed:
{config, ...}: {
nixpkgs.pkgs = (import ...){
config = config.nixpkgs.config; # preserves modularily configured nixpkgs' config
};
}
Why should the above be potentially illegal or what exact failure scenarios could this construct present?
See also: Fix honouring of nixpkgs.config by blaggacao · Pull Request #135 · DBCDK/morph · GitHub