mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 04:05:40 +03:00
nixos/eval-config: Deprecate NIXOS_EXTRA_MODULE_PATH (#349549)
This commit is contained in:
commit
04a5fd4b4f
3 changed files with 24 additions and 31 deletions
|
@ -30,8 +30,29 @@ evalConfigArgs@
|
|||
check ? true
|
||||
, prefix ? []
|
||||
, lib ? import ../../lib
|
||||
, extraModules ? let e = builtins.getEnv "NIXOS_EXTRA_MODULE_PATH";
|
||||
in lib.optional (e != "") (import e)
|
||||
, extraModules ?
|
||||
let e = builtins.getEnv "NIXOS_EXTRA_MODULE_PATH";
|
||||
in lib.optional (e != "") (
|
||||
lib.warn
|
||||
''
|
||||
The NIXOS_EXTRA_MODULE_PATH environment variable is deprecated and will be
|
||||
removed in NixOS 25.05.
|
||||
We recommend a workflow where you update the expression files instead, but
|
||||
if you wish to continue to use this variable, you may do so with a module like:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(builtins.getEnv "NIXOS_EXTRA_MODULE_PATH")
|
||||
];
|
||||
}
|
||||
|
||||
This has the benefit that your configuration hints at the
|
||||
non-standard workflow.
|
||||
''
|
||||
# NOTE: this import call is unnecessary and it even removes the file name
|
||||
# from error messages.
|
||||
import e
|
||||
)
|
||||
}:
|
||||
|
||||
let
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue