summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2020-11-30 22:10:48 +0100
committerSilvan Mosberger <contact@infinisil.com>2020-11-30 23:51:42 +0100
commit991dfccbd1935aabb76a20245ca0108aadd38f3c (patch)
tree8c79dcff8d2bd86626cbf495b945aab58fbb2921 /lib
parent8dea4df90323c43f9cc86a629f1581b91866e11d (diff)
lib/modules: _module.check should always be internal
Honestly this option should probably just be removed
Diffstat (limited to 'lib')
-rw-r--r--lib/modules.nix17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/modules.nix b/lib/modules.nix
index 2c827a01e01b..23dbe962491b 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -73,19 +73,20 @@ rec {
check ? true
}:
let
- # This internal module declare internal options under the `_module'
- # attribute. These options are fragile, as they are used by the
- # module system to change the interpretation of modules.
+ # An internal module that's always added, defining special options which
+ # change the behavior of the module evaluation itself. This is under a
+ # `_`-prefixed namespace in order to prevent name clashes with
+ # user-defined options
internalModule = rec {
# FIXME: Using ./modules.nix directly breaks the doc for some reason
_file = "lib/modules.nix";
key = _file;
- # These options are set to be internal only for prefix != [], aka it's
- # a submodule evaluation. This way their docs are displayed only once
- # as a top-level NixOS option, but will be hidden for all submodules,
- # even though they are available there too
+ # Most of these options are set to be internal only for prefix != [],
+ # aka it's a submodule evaluation. This way their docs are displayed
+ # only once as a top-level NixOS option, but will be hidden for all
+ # submodules, even though they are available there too
options = {
_module.args = mkOption {
# Because things like `mkIf` are entirely useless for
@@ -101,7 +102,7 @@ rec {
_module.check = mkOption {
type = types.bool;
- internal = prefix != [];
+ internal = true;
default = check;
description = ''
Whether to check whether all option definitions have matching