0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

treewide: automatically md-convert option descriptions

the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
This commit is contained in:
pennae 2022-07-28 23:19:15 +02:00
parent 52b0ad17e3
commit 2e751c0772
1050 changed files with 9605 additions and 9605 deletions

View file

@ -9,7 +9,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
description = ''
description = lib.mdDoc ''
Whether to enable the jenkins continuous integration server.
'';
};
@ -17,7 +17,7 @@ in {
user = mkOption {
default = "jenkins";
type = types.str;
description = ''
description = lib.mdDoc ''
User the jenkins server should execute under.
'';
};
@ -25,7 +25,7 @@ in {
group = mkOption {
default = "jenkins";
type = types.str;
description = ''
description = lib.mdDoc ''
If the default user "jenkins" is configured then this is the primary
group of that user.
'';
@ -35,7 +35,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "wheel" "dialout" ];
description = ''
description = lib.mdDoc ''
List of extra groups that the "jenkins" user should be a part of.
'';
};
@ -43,7 +43,7 @@ in {
home = mkOption {
default = "/var/lib/jenkins";
type = types.path;
description = ''
description = lib.mdDoc ''
The path to use as JENKINS_HOME. If the default user "jenkins" is configured then
this is the home of the "jenkins" user.
'';
@ -53,7 +53,7 @@ in {
default = "0.0.0.0";
example = "localhost";
type = types.str;
description = ''
description = lib.mdDoc ''
Specifies the bind address on which the jenkins HTTP interface listens.
The default is the wildcard address.
'';
@ -62,7 +62,7 @@ in {
port = mkOption {
default = 8080;
type = types.port;
description = ''
description = lib.mdDoc ''
Specifies port number on which the jenkins HTTP interface listens.
The default is 8080.
'';
@ -72,7 +72,7 @@ in {
default = "";
example = "/jenkins";
type = types.str;
description = ''
description = lib.mdDoc ''
Specifies a urlPrefix to use with jenkins.
If the example /jenkins is given, the jenkins server will be
accessible using localhost:8080/jenkins.
@ -83,14 +83,14 @@ in {
default = pkgs.jenkins;
defaultText = literalExpression "pkgs.jenkins";
type = types.package;
description = "Jenkins package to use.";
description = lib.mdDoc "Jenkins package to use.";
};
packages = mkOption {
default = [ pkgs.stdenv pkgs.git pkgs.jdk11 config.programs.ssh.package pkgs.nix ];
defaultText = literalExpression "[ pkgs.stdenv pkgs.git pkgs.jdk11 config.programs.ssh.package pkgs.nix ]";
type = types.listOf types.package;
description = ''
description = lib.mdDoc ''
Packages to add to PATH for the jenkins process.
'';
};
@ -98,12 +98,12 @@ in {
environment = mkOption {
default = { };
type = with types; attrsOf str;
description = ''
description = lib.mdDoc ''
Additional environment variables to be passed to the jenkins process.
As a base environment, jenkins receives NIX_PATH from
<option>environment.sessionVariables</option>, NIX_REMOTE is set to
{option}`environment.sessionVariables`, NIX_REMOTE is set to
"daemon" and JENKINS_HOME is set to the value of
<option>services.jenkins.home</option>.
{option}`services.jenkins.home`.
This option has precedence and can be used to override those
mentioned variables.
'';
@ -112,13 +112,13 @@ in {
plugins = mkOption {
default = null;
type = types.nullOr (types.attrsOf types.package);
description = ''
description = lib.mdDoc ''
A set of plugins to activate. Note that this will completely
remove and replace any previously installed plugins. If you
have manually-installed plugins that you want to keep while
using this module, set this option to
<literal>null</literal>. You can generate this set with a
tool such as <literal>jenkinsPlugins2nix</literal>.
`null`. You can generate this set with a
tool such as `jenkinsPlugins2nix`.
'';
example = literalExpression ''
import path/to/jenkinsPlugins2nix-generated-plugins.nix { inherit (pkgs) fetchurl stdenv; }
@ -129,7 +129,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "--debug=9" ];
description = ''
description = lib.mdDoc ''
Additional command line arguments to pass to Jenkins.
'';
};
@ -138,7 +138,7 @@ in {
type = types.listOf types.str;
default = [ ];
example = [ "-Xmx80m" ];
description = ''
description = lib.mdDoc ''
Additional command line arguments to pass to the Java run time (as opposed to Jenkins).
'';
};
@ -146,12 +146,12 @@ in {
withCLI = mkOption {
type = types.bool;
default = false;
description = ''
description = lib.mdDoc ''
Whether to make the CLI available.
More info about the CLI available at
<link xlink:href="https://www.jenkins.io/doc/book/managing/cli">
https://www.jenkins.io/doc/book/managing/cli</link> .
[
https://www.jenkins.io/doc/book/managing/cli](https://www.jenkins.io/doc/book/managing/cli) .
'';
};
};