git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #167776 from hercules-ci/lib-modules-allow-disable-_modules.args-docs-internal

lib.modules: Allow making _module.args internal

commitc2451ed1a2ebdd25d5f6b343f2182f3457bb4cfb authorRobert Hensing <roberth@users.noreply.github.com> dateSat 30 Apr 2022, 13:43 (5 years ago) parent1cef70e14aa201
1 file changed+4−1
lib/modules.nix+4−1
lib/modules.nix+4−1
@@ -160,7 +160,10 @@ rec {
160160 type = types.lazyAttrsOf types.raw;
161161 # Only render documentation once at the root of the option tree,
162162 # not for all individual submodules.
163− internal = prefix != [];
163+ # Allow merging option decls to make this internal regardless.
164+ ${if prefix == []
165+ then null # unset => visible
166+ else "internal"} = true;
164167 # TODO: Change the type of this option to a submodule with a
165168 # freeformType, so that individual arguments can be documented
166169 # separately