Merge pull request #167037 from schuelermine/patch-doc-submodule-default

nixos/doc/types: note submodules’ default’s behaviour
This commit is contained in:
pennae 2022-05-27 13:21:48 +00:00 committed by GitHub
commit f16c8e58ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -308,6 +308,10 @@ The option set can be defined directly
([Example: Directly defined submodule](#ex-submodule-direct)) or as reference ([Example: Directly defined submodule](#ex-submodule-direct)) or as reference
([Example: Submodule defined as a reference](#ex-submodule-reference)). ([Example: Submodule defined as a reference](#ex-submodule-reference)).
Note that even if your submodules options all have a default value,
you will still need to provide a default value (e.g. an empty attribute set)
if you want to allow users to leave it undefined.
::: {#ex-submodule-direct .example} ::: {#ex-submodule-direct .example}
::: {.title} ::: {.title}
**Example: Directly defined submodule** **Example: Directly defined submodule**

View file

@ -617,6 +617,12 @@
(<link linkend="ex-submodule-reference">Example: Submodule defined (<link linkend="ex-submodule-reference">Example: Submodule defined
as a reference</link>). as a reference</link>).
</para> </para>
<para>
Note that even if your submodules options all have a default
value, you will still need to provide a default value (e.g. an
empty attribute set) if you want to allow users to leave it
undefined.
</para>
<anchor xml:id="ex-submodule-direct" /> <anchor xml:id="ex-submodule-direct" />
<para> <para>
<emphasis role="strong">Example: Directly defined <emphasis role="strong">Example: Directly defined