From 0829ce947cc45519bfa8bd3ad0cbb7a014a86554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 22 Jun 2025 12:33:06 +0200 Subject: [PATCH] nixos/eval-config: Remove NIXOS_EXTRA_MODULE_PATH This removes the previously depricated NIXOS_EXTRA_MODULE_PATH environment variable. Tested with $ nix-instantiate nixos/lib/eval-config.nix --arg modules '[{fileSystems."/".device="x";boot.loader.grub.enable=false;}]' -A config.system.build.toplevel $ NIXOS_EXTRA_MODULE_PATH=$HOME/whatever.nix nix-instantiate nixos/lib/eval-config.nix --arg modules '[{fileSystems."/".device="x";boot.loader.grub.enable=false;}]' -A config.system.build.toplevel --- .../manual/release-notes/rl-2511.section.md | 14 ++++++++++ nixos/lib/eval-config.nix | 27 +------------------ 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2511.section.md b/nixos/doc/manual/release-notes/rl-2511.section.md index 7b0ac7d6b231..8ed7e2f4ffb8 100644 --- a/nixos/doc/manual/release-notes/rl-2511.section.md +++ b/nixos/doc/manual/release-notes/rl-2511.section.md @@ -173,6 +173,20 @@ - `renovate` was updated to v41. See the upstream release notes for [v40](https://github.com/renovatebot/renovate/releases/tag/40.0.0) and [v41](https://github.com/renovatebot/renovate/releases/tag/41.0.0) for breaking changes. +- The "NIXOS_EXTRA_MODULE_PATH" variable from configuration evaluation has been deprecated. + 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: + + ```nix + { + imports = [ + (builtins.getEnv "NIXOS_EXTRA_MODULE_PATH") + ]; + } + ``` + + This has the benefit that your configuration hints at the non-standard workflow. + - `i18n.inputMethod.fcitx5.plasma6Support` has been removed because qt6 is the only one used for fcitx5-configtool now. - The `boot.readOnlyNixStore` has been removed. Control over bind mount options on `/nix/store` is now offered by the `boot.nixStoreMountOpts` option. diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix index a39bf7599c7d..928c8000d64f 100644 --- a/nixos/lib/eval-config.nix +++ b/nixos/lib/eval-config.nix @@ -30,32 +30,7 @@ evalConfigArgs@{ check ? true, prefix ? [ ], lib ? import ../../lib, - 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 - ), + extraModules ? [ ], }: let