summary refs log tree commit diff
path: root/nixos/doc/manual/from_md/development
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2021-12-08 19:02:29 +0100
committerSilvan Mosberger <contact@infinisil.com>2022-03-01 19:31:00 +0100
commit5cbeddfde486ca5524baeaf3da6e8944075cf463 (patch)
treed529522033bcfdc0272fba08e8e3fe1897dbe4e0 /nixos/doc/manual/from_md/development
parent891e65b0fa1b7c75c42b5404934307f64828e428 (diff)
downloadnixpkgs-5cbeddfde486ca5524baeaf3da6e8944075cf463.tar
nixpkgs-5cbeddfde486ca5524baeaf3da6e8944075cf463.tar.gz
nixpkgs-5cbeddfde486ca5524baeaf3da6e8944075cf463.tar.bz2
nixpkgs-5cbeddfde486ca5524baeaf3da6e8944075cf463.tar.lz
nixpkgs-5cbeddfde486ca5524baeaf3da6e8944075cf463.tar.xz
nixpkgs-5cbeddfde486ca5524baeaf3da6e8944075cf463.tar.zst
nixpkgs-5cbeddfde486ca5524baeaf3da6e8944075cf463.zip
lib.types: Introduce `types.optionType`
This type correctly merges multiple option types together while also
annotating them with file information. In a future commit this will be
used for `_module.freeformType`
Diffstat (limited to 'nixos/doc/manual/from_md/development')
-rw-r--r--nixos/doc/manual/from_md/development/option-types.section.xml14
1 files changed, 14 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 90ef05a24e7..50a3da0ef5b 100644
--- a/nixos/doc/manual/from_md/development/option-types.section.xml
+++ b/nixos/doc/manual/from_md/development/option-types.section.xml
@@ -113,6 +113,20 @@
       </varlistentry>
       <varlistentry>
         <term>
+          <literal>types.optionType</literal>
+        </term>
+        <listitem>
+          <para>
+            The type of an option’s type. Its merging operation ensures
+            that nested options have the correct file location
+            annotated, and that if possible, multiple option definitions
+            are correctly merged together. The main use case is as the
+            type of the <literal>_module.freeformType</literal> option.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
           <literal>types.attrs</literal>
         </term>
         <listitem>