From f01ce79aecd8e59ab8a5e1fa2c2d66c224427c22 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Thu, 27 Aug 2026 12:22:03 +0200 Subject: [PATCH] lib/modules: inline errorContext string in applyModuleArgs --- lib/modules.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/modules.nix b/lib/modules.nix index 2e5228d232cb..d79382fdcd67 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -722,10 +722,9 @@ let # a module will resolve strictly the attributes used as argument but # not their values. The values are forwarding the result of the # evaluation of the option. - context = name: ''while evaluating the module argument `${name}' in "${key}":''; extraArgs = mapAttrs ( name: _: - addErrorContext (context name) ( + addErrorContext ''while evaluating the module argument `${name}' in "${key}":'' ( args.${name} or (addErrorContext "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`" config._module.args.${name}