@ -74,7 +74,7 @@ rec {
apply ? null ,
# Whether the option is for NixOS developers only.
internal ? null ,
# Whether the option shows up in the manual.
# Whether the option shows up in the manual. Default: true. Use false to hide the option and any sub-options from submodules. Use "shallow" to hide only sub-options.
visible ? null ,
# Whether the option can be set only once
readOnly ? null ,
@ -180,7 +180,10 @@ rec {
description = opt . description or ( lib . warn " O p t i o n ` ${ name } ' h a s n o d e s c r i p t i o n . " " T h i s o p t i o n h a s n o d e s c r i p t i o n . " ) ;
declarations = filter ( x : x != unknownModule ) opt . declarations ;
internal = opt . internal or false ;
visible = opt . visible or true ;
visible =
if ( opt ? visible && opt . visible == " s h a l l o w " )
then true
else opt . visible or true ;
readOnly = opt . readOnly or false ;
type = opt . type . description or null ;
}
@ -192,8 +195,9 @@ rec {
subOptions =
let ss = opt . type . getSubOptions opt . loc ;
in if ss != { } then optionAttrSetToDocList' opt . loc ss else [ ] ;
subOptionsVisible = docOption . visible && opt . visible or null != " s h a l l o w " ;
in
[ docOption ] ++ optionals docOption . v isible subOptions ) ( collect isOption options ) ;
[ docOption ] ++ optionals subOptionsV isible subOptions ) ( collect isOption options ) ;
/* T h i s f u n c t i o n r e c u r s i v e l y r e m o v e s a l l d e r i v a t i o n a t t r i b u t e s f r o m