Skip to content

Commit

Permalink
lib/modules: disallow setting config in specialArgs of evalModules
Browse files Browse the repository at this point in the history
  • Loading branch information
eclairevoyant committed Mar 10, 2025
1 parent dcd16b8 commit fd146e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ let
addErrorContext
all
any
assertMsg
attrByPath
attrNames
catAttrs
Expand Down Expand Up @@ -101,6 +102,7 @@ let
, # This would be remove in the future, Prefer _module.check option instead.
check ? true
}:
assert assertMsg (!specialArgs?config) "Do not set config in the specialArgs argument to evalModules.";
let
withWarnings = x:
warnIf (evalModulesArgs?args) "The args argument to evalModules is deprecated. Please set config._module.args instead."
Expand Down

0 comments on commit fd146e8

Please sign in to comment.