Loading nixos/doc/manual/development/option-declarations.section.md +7 −6 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ options = { type = type specification; default = default value; example = example value; description = "Description for use in the NixOS manual."; description = lib.mdDoc "Description for use in the NixOS manual."; }; }; ``` Loading Loading @@ -59,8 +59,9 @@ The function `mkOption` accepts the following arguments. : A textual description of the option, in [Nixpkgs-flavored Markdown]( https://nixos.org/nixpkgs/manual/#sec-contributing-markup) format, that will be included in the NixOS manual. During the migration process from DocBook to CommonMark the description may also be written in DocBook, but this is discouraged. it is necessary to mark descriptions written in CommonMark with `lib.mdDoc`. The description may still be written in DocBook (without any marker), but this is discouraged and will be deprecated in the future. ## Utility functions for common option patterns {#sec-option-declarations-util} Loading @@ -83,7 +84,7 @@ lib.mkOption { type = lib.types.bool; default = false; example = true; description = "Whether to enable magic."; description = lib.mdDoc "Whether to enable magic."; } ``` Loading Loading @@ -116,7 +117,7 @@ lib.mkOption { type = lib.types.package; default = pkgs.hello; defaultText = lib.literalExpression "pkgs.hello"; description = "The hello package to use."; description = lib.mdDoc "The hello package to use."; } ``` Loading @@ -132,7 +133,7 @@ lib.mkOption { default = pkgs.ghc; defaultText = lib.literalExpression "pkgs.ghc"; example = lib.literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])"; description = "The GHC package to use."; description = lib.mdDoc "The GHC package to use."; } ``` Loading nixos/doc/manual/from_md/development/option-declarations.section.xml +9 −7 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ options = { type = type specification; default = default value; example = example value; description = "Description for use in the NixOS manual."; description = lib.mdDoc "Description for use in the NixOS manual."; }; }; </programlisting> Loading Loading @@ -98,9 +98,11 @@ options = { A textual description of the option, in <link xlink:href="https://nixos.org/nixpkgs/manual/#sec-contributing-markup">Nixpkgs-flavored Markdown</link> format, that will be included in the NixOS manual. During the migration process from DocBook to CommonMark the description may also be written in DocBook, but this is discouraged. manual. During the migration process from DocBook it is necessary to mark descriptions written in CommonMark with <literal>lib.mdDoc</literal>. The description may still be written in DocBook (without any marker), but this is discouraged and will be deprecated in the future. </para> </listitem> </varlistentry> Loading Loading @@ -132,7 +134,7 @@ lib.mkOption { type = lib.types.bool; default = false; example = true; description = "Whether to enable magic."; description = lib.mdDoc "Whether to enable magic."; } </programlisting> <section xml:id="sec-option-declarations-util-mkPackageOption"> Loading Loading @@ -182,7 +184,7 @@ lib.mkOption { type = lib.types.package; default = pkgs.hello; defaultText = lib.literalExpression "pkgs.hello"; description = "The hello package to use."; description = lib.mdDoc "The hello package to use."; } </programlisting> <anchor xml:id="ex-options-declarations-util-mkPackageOption-ghc" /> Loading @@ -197,7 +199,7 @@ lib.mkOption { default = pkgs.ghc; defaultText = lib.literalExpression "pkgs.ghc"; example = lib.literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])"; description = "The GHC package to use."; description = lib.mdDoc "The GHC package to use."; } </programlisting> <section xml:id="sec-option-declarations-eot"> Loading Loading
nixos/doc/manual/development/option-declarations.section.md +7 −6 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ options = { type = type specification; default = default value; example = example value; description = "Description for use in the NixOS manual."; description = lib.mdDoc "Description for use in the NixOS manual."; }; }; ``` Loading Loading @@ -59,8 +59,9 @@ The function `mkOption` accepts the following arguments. : A textual description of the option, in [Nixpkgs-flavored Markdown]( https://nixos.org/nixpkgs/manual/#sec-contributing-markup) format, that will be included in the NixOS manual. During the migration process from DocBook to CommonMark the description may also be written in DocBook, but this is discouraged. it is necessary to mark descriptions written in CommonMark with `lib.mdDoc`. The description may still be written in DocBook (without any marker), but this is discouraged and will be deprecated in the future. ## Utility functions for common option patterns {#sec-option-declarations-util} Loading @@ -83,7 +84,7 @@ lib.mkOption { type = lib.types.bool; default = false; example = true; description = "Whether to enable magic."; description = lib.mdDoc "Whether to enable magic."; } ``` Loading Loading @@ -116,7 +117,7 @@ lib.mkOption { type = lib.types.package; default = pkgs.hello; defaultText = lib.literalExpression "pkgs.hello"; description = "The hello package to use."; description = lib.mdDoc "The hello package to use."; } ``` Loading @@ -132,7 +133,7 @@ lib.mkOption { default = pkgs.ghc; defaultText = lib.literalExpression "pkgs.ghc"; example = lib.literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])"; description = "The GHC package to use."; description = lib.mdDoc "The GHC package to use."; } ``` Loading
nixos/doc/manual/from_md/development/option-declarations.section.xml +9 −7 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ options = { type = type specification; default = default value; example = example value; description = "Description for use in the NixOS manual."; description = lib.mdDoc "Description for use in the NixOS manual."; }; }; </programlisting> Loading Loading @@ -98,9 +98,11 @@ options = { A textual description of the option, in <link xlink:href="https://nixos.org/nixpkgs/manual/#sec-contributing-markup">Nixpkgs-flavored Markdown</link> format, that will be included in the NixOS manual. During the migration process from DocBook to CommonMark the description may also be written in DocBook, but this is discouraged. manual. During the migration process from DocBook it is necessary to mark descriptions written in CommonMark with <literal>lib.mdDoc</literal>. The description may still be written in DocBook (without any marker), but this is discouraged and will be deprecated in the future. </para> </listitem> </varlistentry> Loading Loading @@ -132,7 +134,7 @@ lib.mkOption { type = lib.types.bool; default = false; example = true; description = "Whether to enable magic."; description = lib.mdDoc "Whether to enable magic."; } </programlisting> <section xml:id="sec-option-declarations-util-mkPackageOption"> Loading Loading @@ -182,7 +184,7 @@ lib.mkOption { type = lib.types.package; default = pkgs.hello; defaultText = lib.literalExpression "pkgs.hello"; description = "The hello package to use."; description = lib.mdDoc "The hello package to use."; } </programlisting> <anchor xml:id="ex-options-declarations-util-mkPackageOption-ghc" /> Loading @@ -197,7 +199,7 @@ lib.mkOption { default = pkgs.ghc; defaultText = lib.literalExpression "pkgs.ghc"; example = lib.literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])"; description = "The GHC package to use."; description = lib.mdDoc "The GHC package to use."; } </programlisting> <section xml:id="sec-option-declarations-eot"> Loading