···1111 type = type specification;
1212 default = default value;
1313 example = example value;
1414- description = "Description for use in the NixOS manual.";
1414+ description = lib.mdDoc "Description for use in the NixOS manual.";
1515 };
1616};
1717```
···5959: A textual description of the option, in [Nixpkgs-flavored Markdown](
6060 https://nixos.org/nixpkgs/manual/#sec-contributing-markup) format, that will be
6161 included in the NixOS manual. During the migration process from DocBook
6262- to CommonMark the description may also be written in DocBook, but this is
6363- discouraged.
6262+ it is necessary to mark descriptions written in CommonMark with `lib.mdDoc`.
6363+ The description may still be written in DocBook (without any marker), but this
6464+ is discouraged and will be deprecated in the future.
64656566## Utility functions for common option patterns {#sec-option-declarations-util}
6667···8384 type = lib.types.bool;
8485 default = false;
8586 example = true;
8686- description = "Whether to enable magic.";
8787+ description = lib.mdDoc "Whether to enable magic.";
8788}
8889```
8990···116117 type = lib.types.package;
117118 default = pkgs.hello;
118119 defaultText = lib.literalExpression "pkgs.hello";
119119- description = "The hello package to use.";
120120+ description = lib.mdDoc "The hello package to use.";
120121}
121122```
122123···132133 default = pkgs.ghc;
133134 defaultText = lib.literalExpression "pkgs.ghc";
134135 example = lib.literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
135135- description = "The GHC package to use.";
136136+ description = lib.mdDoc "The GHC package to use.";
136137}
137138```
138139
···1212 type = type specification;
1313 default = default value;
1414 example = example value;
1515- description = "Description for use in the NixOS manual.";
1515+ description = lib.mdDoc "Description for use in the NixOS manual.";
1616 };
1717};
1818</programlisting>
···9898 A textual description of the option, in
9999 <link xlink:href="https://nixos.org/nixpkgs/manual/#sec-contributing-markup">Nixpkgs-flavored
100100 Markdown</link> format, that will be included in the NixOS
101101- manual. During the migration process from DocBook to
102102- CommonMark the description may also be written in DocBook, but
103103- this is discouraged.
101101+ manual. During the migration process from DocBook it is
102102+ necessary to mark descriptions written in CommonMark with
103103+ <literal>lib.mdDoc</literal>. The description may still be
104104+ written in DocBook (without any marker), but this is
105105+ discouraged and will be deprecated in the future.
104106 </para>
105107 </listitem>
106108 </varlistentry>
···132134 type = lib.types.bool;
133135 default = false;
134136 example = true;
135135- description = "Whether to enable magic.";
137137+ description = lib.mdDoc "Whether to enable magic.";
136138}
137139</programlisting>
138140 <section xml:id="sec-option-declarations-util-mkPackageOption">
···182184 type = lib.types.package;
183185 default = pkgs.hello;
184186 defaultText = lib.literalExpression "pkgs.hello";
185185- description = "The hello package to use.";
187187+ description = lib.mdDoc "The hello package to use.";
186188}
187189</programlisting>
188190 <anchor xml:id="ex-options-declarations-util-mkPackageOption-ghc" />
···197199 default = pkgs.ghc;
198200 defaultText = lib.literalExpression "pkgs.ghc";
199201 example = lib.literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
200200- description = "The GHC package to use.";
202202+ description = lib.mdDoc "The GHC package to use.";
201203}
202204</programlisting>
203205 <section xml:id="sec-option-declarations-eot">