git.iko.soy/typeable/nixpkgs
on master help sign in
lib.modules: Allow making _module.args internal

This allows other module system consumers to disable these docs via option merging. For instance arion uses asciidoc instead of docbook so that would look awful.

commit14aa201b658f43546b00153bb2ada7206ba8dd26 authorRobert Hensing <robert@roberthensing.nl> dateThu 7 Apr 2022, 23:36 (5 years ago) parentf087013
1 file changed+4−1
lib/modules.nix+4−1
lib/modules.nix+4−1
@@ -156,7 +156,10 @@ rec {
156156 type = types.lazyAttrsOf types.raw;
157157 # Only render documentation once at the root of the option tree,
158158 # not for all individual submodules.
159− internal = prefix != [];
159+ # Allow merging option decls to make this internal regardless.
160+ ${if prefix == []
161+ then null # unset => visible
162+ else "internal"} = true;
160163 # TODO: Change the type of this option to a submodule with a
161164 # freeformType, so that individual arguments can be documented
162165 # separately