mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/lib/eval-config: Add warning when masking pkgs (#349453)
This commit is contained in:
commit
039cbd8e93
1 changed files with 8 additions and 0 deletions
|
@ -65,6 +65,14 @@ let
|
||||||
withWarnings = x:
|
withWarnings = x:
|
||||||
lib.warnIf (evalConfigArgs?extraArgs) "The extraArgs argument to eval-config.nix is deprecated. Please set config._module.args instead."
|
lib.warnIf (evalConfigArgs?extraArgs) "The extraArgs argument to eval-config.nix is deprecated. Please set config._module.args instead."
|
||||||
lib.warnIf (evalConfigArgs?check) "The check argument to eval-config.nix is deprecated. Please set config._module.check instead."
|
lib.warnIf (evalConfigArgs?check) "The check argument to eval-config.nix is deprecated. Please set config._module.check instead."
|
||||||
|
lib.warnIf (specialArgs?pkgs) ''
|
||||||
|
You have set specialArgs.pkgs, which means that options like nixpkgs.config
|
||||||
|
and nixpkgs.overlays will be ignored. If you wish to reuse an already created
|
||||||
|
pkgs, which you know is configured correctly for this NixOS configuration,
|
||||||
|
please import the `nixosModules.pkgsReadOnly` module from the nixpkgs flake or
|
||||||
|
`(modulesPath + "/misc/nixpkgs/read-only.nix"), and set `{ nixpkgs.pkgs = <your pkgs>; }`.
|
||||||
|
This properly disables the ignored options to prevent future surprises.
|
||||||
|
''
|
||||||
x;
|
x;
|
||||||
|
|
||||||
legacyModules =
|
legacyModules =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue