diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-01-24 16:27:41 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-01-24 16:31:59 +0100 |
commit | 48dbe26229124114f26cfe0eec32866a47888452 (patch) | |
tree | 6a5c863598baccf7fb95520bc3a670e47acb677a | |
parent | 8691ab3d47f1f9f94b51357fba7b8133cc8bcd88 (diff) | |
download | nixpkgs-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.md | 6 | ||||
-rw-r--r-- | nixos/doc/manual/from_md/development/option-types.section.xml | 16 |
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 <option path> 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> |