mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 16:23:26 +00:00
nixos/nixpkgs: assert that nixpkgs.config is not set when pkgs is passed in externally
This is a common footgun people hit often. Remove it.
This commit is contained in:
parent
cdb6bfeab9
commit
ce87196a00
@ -383,6 +383,16 @@ in
|
||||
the legacy definitions.
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion = opt.pkgs.isDefined -> cfg.config == {};
|
||||
message = ''
|
||||
Your system configures nixpkgs with an externally created instance.
|
||||
`nixpkgs.config` options should be passed when creating the instance instead.
|
||||
|
||||
Current value:
|
||||
${lib.generators.toPretty { multiline = true; } opt.config}
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user