Skip to content

Commit 689b8ad

Browse files
committedMar 10, 2025
lib/modules: disallow setting config in specialArgs of evalModules
1 parent dcd16b8 commit 689b8ad

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎lib/modules.nix

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ let
55
addErrorContext
66
all
77
any
8+
assertMsg
89
attrByPath
910
attrNames
1011
catAttrs
@@ -101,6 +102,7 @@ let
101102
, # This would be remove in the future, Prefer _module.check option instead.
102103
check ? true
103104
}:
105+
assert assertMsg (!specialArgs?config) "Do not set config in specialArgs";
104106
let
105107
withWarnings = x:
106108
warnIf (evalModulesArgs?args) "The args argument to evalModules is deprecated. Please set config._module.args instead."

0 commit comments

Comments
 (0)
Failed to load comments.