mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
Merge pull request #257458 from K900/die-nixpkgs-config-die
treewide: fail when `nixpkgs.config` is set with explicit `pkgs`, remove all `nixpkgs.config` usages in in-tree modules
This commit is contained in:
commit
eb8ce7930d
16 changed files with 59 additions and 63 deletions
|
@ -230,9 +230,7 @@ in
|
|||
plocate = (mkIf isPLocate (mkMerge [ common plocate ]));
|
||||
};
|
||||
|
||||
nixpkgs.config = { locate.dbfile = cfg.output; };
|
||||
|
||||
environment.systemPackages = [ cfg.locate ];
|
||||
environment.systemPackages = [ (cfg.locate.override { dbfile = cfg.output; }) ];
|
||||
|
||||
environment.variables = mkIf (!isMorPLocate) { LOCATE_PATH = cfg.output; };
|
||||
|
||||
|
|
|
@ -379,6 +379,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…
Add table
Add a link
Reference in a new issue