diff options
Diffstat (limited to 'nixos/doc/manual/from_md/development/option-types.section.xml')
-rw-r--r-- | nixos/doc/manual/from_md/development/option-types.section.xml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/nixos/doc/manual/from_md/development/option-types.section.xml b/nixos/doc/manual/from_md/development/option-types.section.xml index c67e183581c2c..820646be671f4 100644 --- a/nixos/doc/manual/from_md/development/option-types.section.xml +++ b/nixos/doc/manual/from_md/development/option-types.section.xml @@ -427,6 +427,40 @@ </itemizedlist> </listitem> </varlistentry> + <varlistentry> + <term> + <literal>types.deferredModule</literal> + </term> + <listitem> + <para> + Whereas <literal>submodule</literal> represents an option + tree, <literal>deferredModule</literal> represents a module + value, such as a module file or a configuration. + </para> + <para> + It can be set multiple times. + </para> + <para> + Module authors can use its value, which is always a list of + module values, in <literal>imports</literal> or in + <literal>submoduleWith</literal>’s + <literal>modules</literal> parameter. Note that + <literal>imports</literal> must be evaluated before the + module fixpoint. Because of this, deferred modules can only + be imported into <quote>other</quote> fixpoints, such as + submodules. + </para> + <para> + One use case for this type is the type of a + <quote>default</quote> module that allow the user to affect + all submodules in an <literal>attrsOf submodule</literal> at + once. This is more convenient and discoverable than + expecting the module user to type-merge with the + <literal>attrsOf submodule</literal> option. NixOps uses + this type in <literal>network.defaults</literal>. + </para> + </listitem> + </varlistentry> </variablelist> </section> <section xml:id="sec-option-types-composed"> |