summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2022-01-24 16:27:41 +0100
committerRobert Hensing <robert@roberthensing.nl>2022-01-24 16:31:59 +0100
commit48dbe26229124114f26cfe0eec32866a47888452 (patch)
tree6a5c863598baccf7fb95520bc3a670e47acb677a
parent8691ab3d47f1f9f94b51357fba7b8133cc8bcd88 (diff)
downloadnixpkgs-48dbe26229124114f26cfe0eec32866a47888452.tar
nixpkgs-48dbe26229124114f26cfe0eec32866a47888452.tar.gz
nixpkgs-48dbe26229124114f26cfe0eec32866a47888452.tar.bz2
nixpkgs-48dbe26229124114f26cfe0eec32866a47888452.tar.lz
nixpkgs-48dbe26229124114f26cfe0eec32866a47888452.tar.xz
nixpkgs-48dbe26229124114f26cfe0eec32866a47888452.tar.zst
nixpkgs-48dbe26229124114f26cfe0eec32866a47888452.zip
nixos/doc: Document types.unique
-rw-r--r--nixos/doc/manual/development/option-types.section.md6
-rw-r--r--nixos/doc/manual/from_md/development/option-types.section.xml16
2 files changed, 22 insertions, 0 deletions
diff --git a/nixos/doc/manual/development/option-types.section.md b/nixos/doc/manual/development/option-types.section.md
index ed557206659..56ffa8e9d79 100644
--- a/nixos/doc/manual/development/option-types.section.md
+++ b/nixos/doc/manual/development/option-types.section.md
@@ -250,6 +250,12 @@ Composed types are types that take a type as parameter. `listOf
 :   Ensures that type *`t`* cannot be merged. It is used to ensure option
     definitions are declared only once.
 
+`types.unique` `{ message = m }` *`t`*
+
+:   Ensures that type *`t`* cannot be merged. Prints the message *`m`*, after
+    the line `The option <option path> is defined multiple times.` and before
+    a list of definition locations.
+
 `types.either` *`t1 t2`*
 
 :   Type *`t1`* or type *`t2`*, e.g. `with types; either int str`.
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 c83ffa2add5..76ffb6f837c 100644
--- a/nixos/doc/manual/from_md/development/option-types.section.xml
+++ b/nixos/doc/manual/from_md/development/option-types.section.xml
@@ -498,6 +498,22 @@
       </varlistentry>
       <varlistentry>
         <term>
+          <literal>types.unique</literal>
+          <literal>{ message = m }</literal>
+          <emphasis><literal>t</literal></emphasis>
+        </term>
+        <listitem>
+          <para>
+            Ensures that type <emphasis><literal>t</literal></emphasis>
+            cannot be merged. Prints the message
+            <emphasis><literal>m</literal></emphasis>, after the line
+            <literal>The option &lt;option path&gt; is defined multiple times.</literal>
+            and before a list of definition locations.
+          </para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term>
           <literal>types.either</literal>
           <emphasis><literal>t1 t2</literal></emphasis>
         </term>