git.iko.soy/typeable/nixpkgs
on master help sign in
lib/modules: Deprecate args and check
commit260b941dd0e7e72cf9b87f36f92b7e60f38d661f authorRobert Hensing <robert@roberthensing.nl> dateThu 2 Dec 2021, 17:47 (5 years ago) parent78ada83
1 file changed+6−1
lib/modules.nix+6−1
lib/modules.nix+6−1
@@ -101,6 +101,11 @@ rec {
101101 check ? true
102102 }:
103103 let
104+ withWarnings = x:
105+ lib.warnIf (evalModulesArgs?args) "The args argument to evalModules is deprecated. Please set config._module.args instead."
106+ lib.warnIf (evalModulesArgs?check) "The check argument to evalModules is deprecated. Please set config._module.check instead."
107+ x;
108+
104109 legacyModules =
105110 optional (evalModulesArgs?args) {
106111 config = {
@@ -248,7 +253,7 @@ rec {
248253 inherit modules specialArgs;
249254 };
250255
251− result = {
256+ result = withWarnings {
252257 options = checked options;
253258 config = checked (removeAttrs config [ "_module" ]);
254259 _module = checked (config._module);