Unverified Commit 50f9b310 authored by pennae's avatar pennae Committed by GitHub
Browse files

Merge pull request #185474 from pennae/option-docs-md

nixos/*: more options md conversion
parents a253a7da 087472b1
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -26,13 +26,12 @@ in
        { "net.ipv4.tcp_syncookies" = false; "vm.swappiness" = 60; }
      '';
      type = types.attrsOf sysctlOption;
      description = ''
      description = lib.mdDoc ''
        Runtime parameters of the Linux kernel, as set by
        <citerefentry><refentrytitle>sysctl</refentrytitle>
        <manvolnum>8</manvolnum></citerefentry>.  Note that sysctl
        {manpage}`sysctl(8)`.  Note that sysctl
        parameters names must be enclosed in quotes
        (e.g. <literal>"vm.swappiness"</literal> instead of
        <literal>vm.swappiness</literal>).  The value of each
        (e.g. `"vm.swappiness"` instead of
        `vm.swappiness`).  The value of each
        parameter may be a string, integer, boolean, or null
        (signifying the option will not appear at all).
      '';
+5 −8
Original line number Diff line number Diff line
@@ -39,26 +39,23 @@ in
    environment.profileRelativeSessionVariables = mkOption {
      type = types.attrsOf (types.listOf types.str);
      example = { PATH = [ "/bin" ]; MANPATH = [ "/man" "/share/man" ]; };
      description = ''
      description = lib.mdDoc ''
        Attribute set of environment variable used in the global
        environment. These variables will be set by PAM early in the
        login process.

        Variable substitution is available as described in
        <citerefentry>
          <refentrytitle>pam_env.conf</refentrytitle>
          <manvolnum>5</manvolnum>
        </citerefentry>.
        {manpage}`pam_env.conf(5)`.

        Each attribute maps to a list of relative paths. Each relative
        path is appended to the each profile of
        <option>environment.profiles</option> to form the content of
        {option}`environment.profiles` to form the content of
        the corresponding environment variable.

        Also, these variables are merged into
        <xref linkend="opt-environment.profileRelativeEnvVars"/> and it is
        [](#opt-environment.profileRelativeEnvVars) and it is
        therefore not possible to use PAM style variables such as
        <literal>@{HOME}</literal>.
        `@{HOME}`.
      '';
    };

+19 −19
Original line number Diff line number Diff line
@@ -454,23 +454,23 @@ in

    isoImage.isoName = mkOption {
      default = "${config.isoImage.isoBaseName}.iso";
      description = ''
      description = lib.mdDoc ''
        Name of the generated ISO image file.
      '';
    };

    isoImage.isoBaseName = mkOption {
      default = "nixos";
      description = ''
      description = lib.mdDoc ''
        Prefix of the name of the generated ISO image file.
      '';
    };

    isoImage.compressImage = mkOption {
      default = false;
      description = ''
      description = lib.mdDoc ''
        Whether the ISO image should be compressed using
        <command>zstd</command>.
        {command}`zstd`.
      '';
    };

@@ -481,7 +481,7 @@ in
                + lib.optionalString isAarch "-Xbcj arm"
                + lib.optionalString (isPower && is32bit && isBigEndian) "-Xbcj powerpc"
                + lib.optionalString (isSparc) "-Xbcj sparc";
      description = ''
      description = lib.mdDoc ''
        Compression settings to use for the squashfs nix store.
      '';
      example = "zstd -Xcompression-level 6";
@@ -489,7 +489,7 @@ in

    isoImage.edition = mkOption {
      default = "";
      description = ''
      description = lib.mdDoc ''
        Specifies which edition string to use in the volume ID of the generated
        ISO image.
      '';
@@ -498,7 +498,7 @@ in
    isoImage.volumeID = mkOption {
      # nixos-$EDITION-$RELEASE-$ARCH
      default = "nixos${optionalString (config.isoImage.edition != "") "-${config.isoImage.edition}"}-${config.system.nixos.release}-${pkgs.stdenv.hostPlatform.uname.processor}";
      description = ''
      description = lib.mdDoc ''
        Specifies the label or volume ID of the generated ISO image.
        Note that the label is used by stage 1 of the boot process to
        mount the CD, so it should be reasonably distinctive.
@@ -512,7 +512,7 @@ in
          }
        ]
      '';
      description = ''
      description = lib.mdDoc ''
        This option lists files to be copied to fixed locations in the
        generated ISO image.
      '';
@@ -520,7 +520,7 @@ in

    isoImage.storeContents = mkOption {
      example = literalExpression "[ pkgs.stdenv ]";
      description = ''
      description = lib.mdDoc ''
        This option lists additional derivations to be included in the
        Nix store in the generated ISO image.
      '';
@@ -528,7 +528,7 @@ in

    isoImage.includeSystemBuildDependencies = mkOption {
      default = false;
      description = ''
      description = lib.mdDoc ''
        Set this option to include all the needed sources etc in the
        image. It significantly increases image size. Use that when
        you want to be able to keep all the sources needed to build your
@@ -539,14 +539,14 @@ in

    isoImage.makeEfiBootable = mkOption {
      default = false;
      description = ''
      description = lib.mdDoc ''
        Whether the ISO image should be an efi-bootable volume.
      '';
    };

    isoImage.makeUsbBootable = mkOption {
      default = false;
      description = ''
      description = lib.mdDoc ''
        Whether the ISO image should be bootable from CD as well as USB.
      '';
    };
@@ -556,7 +556,7 @@ in
          url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/a9e05d7deb38a8e005a2b52575a3f59a63a4dba0/bootloader/efi-background.png";
          sha256 = "18lfwmp8yq923322nlb9gxrh5qikj1wsk6g5qvdh31c4h5b1538x";
        };
      description = ''
      description = lib.mdDoc ''
        The splash image to use in the EFI bootloader.
      '';
    };
@@ -566,7 +566,7 @@ in
          url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/a9e05d7deb38a8e005a2b52575a3f59a63a4dba0/bootloader/isolinux/bios-boot.png";
          sha256 = "1wp822zrhbg4fgfbwkr7cbkr4labx477209agzc0hr6k62fr6rxd";
        };
      description = ''
      description = lib.mdDoc ''
        The splash image to use in the legacy-boot bootloader.
      '';
    };
@@ -574,7 +574,7 @@ in
    isoImage.grubTheme = mkOption {
      default = pkgs.nixos-grub2-theme;
      type = types.nullOr (types.either types.path types.package);
      description = ''
      description = lib.mdDoc ''
        The grub2 theme used for UEFI boot.
      '';
    };
@@ -605,7 +605,7 @@ in
        MENU COLOR SEL          7;37;40    #FFFFFFFF    #FF5277C3   std
      '';
      type = types.str;
      description = ''
      description = lib.mdDoc ''
        The syslinux theme used for BIOS boot.
      '';
    };
@@ -613,12 +613,12 @@ in
    isoImage.appendToMenuLabel = mkOption {
      default = " Installer";
      example = " Live System";
      description = ''
      description = lib.mdDoc ''
        The string to append after the menu label for the NixOS system.
        This will be directly appended (without whitespace) to the NixOS version
        string, like for example if it is set to <literal>XXX</literal>:
        string, like for example if it is set to `XXX`:

        <literal>NixOS 99.99-pre666XXX</literal>
        `NixOS 99.99-pre666XXX`
      '';
    };

+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ with lib;

    netboot.storeContents = mkOption {
      example = literalExpression "[ pkgs.stdenv ]";
      description = ''
      description = lib.mdDoc ''
        This option lists additional derivations to be included in the
        Nix store in the generated netboot image.
      '';
+15 −16
Original line number Diff line number Diff line
@@ -160,9 +160,9 @@ in
      enable = mkOption {
        type = types.bool;
        default = true;
        description = ''
        description = lib.mdDoc ''
          Whether to install documentation of packages from
          <option>environment.systemPackages</option> into the generated system path.
          {option}`environment.systemPackages` into the generated system path.

          See "Multiple-output packages" chapter in the nixpkgs manual for more info.
        '';
@@ -172,9 +172,9 @@ in
      man.enable = mkOption {
        type = types.bool;
        default = true;
        description = ''
        description = lib.mdDoc ''
          Whether to install manual pages.
          This also includes <literal>man</literal> outputs.
          This also includes `man` outputs.
        '';
      };

@@ -193,8 +193,8 @@ in
      info.enable = mkOption {
        type = types.bool;
        default = true;
        description = ''
          Whether to install info pages and the <command>info</command> command.
        description = lib.mdDoc ''
          Whether to install info pages and the {command}`info` command.
          This also includes "info" outputs.
        '';
      };
@@ -202,8 +202,8 @@ in
      doc.enable = mkOption {
        type = types.bool;
        default = true;
        description = ''
          Whether to install documentation distributed in packages' <literal>/share/doc</literal>.
        description = lib.mdDoc ''
          Whether to install documentation distributed in packages' `/share/doc`.
          Usually plain text and/or HTML.
          This also includes "doc" outputs.
        '';
@@ -230,8 +230,7 @@ in
          Whether to install NixOS's own documentation.
          <itemizedlist>
          <listitem><para>This includes man pages like
                    <citerefentry><refentrytitle>configuration.nix</refentrytitle>
                    <manvolnum>5</manvolnum></citerefentry> if <option>documentation.man.enable</option> is
                    <citerefentry><refentrytitle>configuration.nix</refentrytitle><manvolnum>5</manvolnum></citerefentry> if <option>documentation.man.enable</option> is
                    set.</para></listitem>
          <listitem><para>This includes the HTML manual and the <command>nixos-help</command> command if
                    <option>documentation.doc.enable</option> is set.</para></listitem>
@@ -250,7 +249,7 @@ in
      nixos.options.splitBuild = mkOption {
        type = types.bool;
        default = true;
        description = ''
        description = lib.mdDoc ''
          Whether to split the option docs build into a cacheable and an uncacheable part.
          Splitting the build can substantially decrease the amount of time needed to build
          the manual, but some user modules may be incompatible with this splitting.
@@ -260,7 +259,7 @@ in
      nixos.options.warningsAreErrors = mkOption {
        type = types.bool;
        default = true;
        description = ''
        description = lib.mdDoc ''
          Treat warning emitted during the option documentation build (eg for missing option
          descriptions) as errors.
        '';
@@ -269,18 +268,18 @@ in
      nixos.includeAllModules = mkOption {
        type = types.bool;
        default = false;
        description = ''
        description = lib.mdDoc ''
          Whether the generated NixOS's documentation should include documentation for all
          the options from all the NixOS modules included in the current
          <literal>configuration.nix</literal>. Disabling this will make the manual
          generator to ignore options defined outside of <literal>baseModules</literal>.
          `configuration.nix`. Disabling this will make the manual
          generator to ignore options defined outside of `baseModules`.
        '';
      };

      nixos.extraModuleSources = mkOption {
        type = types.listOf (types.either types.path types.str);
        default = [ ];
        description = ''
        description = lib.mdDoc ''
          Which extra NixOS module paths the generated NixOS's documentation should strip
          from options.
        '';
Loading