diff options
author | Shea Levy <shea@shealevy.com> | 2014-05-05 16:23:57 -0400 |
---|---|---|
committer | Nicolas B. Pierron <nicolas.b.pierron@gmail.com> | 2015-03-12 23:42:57 +0100 |
commit | e3eff53037f1b7abb7a44ba72f59f20649023642 (patch) | |
tree | 4e48d6f16aca424ee144a05390c481aa824ee070 /lib | |
parent | e4a06f35b1d88ab98fa8b6962e7a3f802232d165 (diff) |
evalModules: Add internal option for the check argument
Diffstat (limited to 'lib')
-rw-r--r-- | lib/modules.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/modules.nix b/lib/modules.nix index 84ca209d36711..1d7c7b22765ed 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -25,6 +25,16 @@ rec { internal = true; }; + + __internal.check = mkOption { + description = "Whether to check whether all option definitions have matching declarations."; + + type = types.uniq types.bool; + + internal = true; + + default = check; + }; }; config = { @@ -45,7 +55,7 @@ rec { if isOption v then v.value else yieldConfig (prefix ++ [n]) v) set) ["_definedNames"]; in - if check && set ? _definedNames then + if options.__internal.check.value && set ? _definedNames then fold (m: res: fold (name: res: if set ? ${name} then res else throw "The option `${showOption (prefix ++ [name])}' defined in `${m.file}' does not exist.") |