···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 be6161 included in the NixOS manual. During the migration process from DocBook6262- to CommonMark the description may also be written in DocBook, but this is6363- 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 this6464+ is discouraged and will be deprecated in the future.64656566## Utility functions for common option patterns {#sec-option-declarations-util}6667···8483 type = lib.types.bool;8584 default = false;8685 example = true;8787- description = "Whether to enable magic.";8686+ description = lib.mdDoc "Whether to enable magic.";8887}8988```9089···117116 type = lib.types.package;118117 default = pkgs.hello;119118 defaultText = lib.literalExpression "pkgs.hello";120120- description = "The hello package to use.";119119+ description = lib.mdDoc "The hello package to use.";121120}122121```123122···133132 default = pkgs.ghc;134133 defaultText = lib.literalExpression "pkgs.ghc";135134 example = lib.literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";136136- description = "The GHC package to use.";135135+ description = lib.mdDoc "The GHC package to use.";137136}138137```139138
···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, in9999 <link xlink:href="https://nixos.org/nixpkgs/manual/#sec-contributing-markup">Nixpkgs-flavored100100 Markdown</link> format, that will be included in the NixOS101101- manual. During the migration process from DocBook to102102- CommonMark the description may also be written in DocBook, but103103- this is discouraged.101101+ manual. During the migration process from DocBook it is102102+ necessary to mark descriptions written in CommonMark with103103+ <literal>lib.mdDoc</literal>. The description may still be104104+ written in DocBook (without any marker), but this is105105+ discouraged and will be deprecated in the future.104106 </para>105107 </listitem>106108 </varlistentry>···134132 type = lib.types.bool;135133 default = false;136134 example = true;137137- description = "Whether to enable magic.";135135+ description = lib.mdDoc "Whether to enable magic.";138136}139137</programlisting>140138 <section xml:id="sec-option-declarations-util-mkPackageOption">···184182 type = lib.types.package;185183 default = pkgs.hello;186184 defaultText = lib.literalExpression "pkgs.hello";187187- description = "The hello package to use.";185185+ description = lib.mdDoc "The hello package to use.";188186}189187</programlisting>190188 <anchor xml:id="ex-options-declarations-util-mkPackageOption-ghc" />···199197 default = pkgs.ghc;200198 defaultText = lib.literalExpression "pkgs.ghc";201199 example = lib.literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";202202- description = "The GHC package to use.";200200+ description = lib.mdDoc "The GHC package to use.";203201}204202</programlisting>205203 <section xml:id="sec-option-declarations-eot">