From 78ada833615d241ed76463aa5a024b614150eb4d Mon Sep 17 00:00:00 2001 From: Robert Hensing <robert@roberthensing.nl> Date: Thu, 2 Dec 2021 18:15:08 +0000 Subject: [PATCH] nixos/eval-config: Deprecate extraArgs and check parameters --- nixos/lib/eval-config.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix index 07653c22fb5c..d4567409f401 100644 --- a/nixos/lib/eval-config.nix +++ b/nixos/lib/eval-config.nix @@ -52,6 +52,11 @@ let }; }; + withWarnings = x: + lib.warnIf (evalConfigArgs?args) "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." + x; + legacyModules = lib.optional (evalConfigArgs?args) { config = { @@ -83,7 +88,7 @@ let nixosWithUserModules = noUserModules.extendModules { modules = allUserModules; }; -in { +in withWarnings { # Merge the option definitions in all modules, forming the full # system configuration.