nixos/*: automatically convert option docs

This commit is contained in:
pennae
2022-08-05 19:39:00 +02:00
parent 423545fe48
commit 087472b1e5
162 changed files with 1552 additions and 1552 deletions

View File

@@ -410,7 +410,7 @@ in
type = types.package;
default = pkgs.apacheHttpd;
defaultText = literalExpression "pkgs.apacheHttpd";
description = ''
description = lib.mdDoc ''
Overridable attribute of the Apache HTTP Server package to use.
'';
};
@@ -420,7 +420,7 @@ in
default = confFile;
defaultText = literalExpression "confFile";
example = literalExpression ''pkgs.writeText "httpd.conf" "# my custom config file ..."'';
description = ''
description = lib.mdDoc ''
Override the configuration file used by Apache. By default,
NixOS generates one automatically.
'';
@@ -429,10 +429,10 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
description = lib.mdDoc ''
Configuration lines appended to the generated Apache
configuration file. Note that this mechanism will not work
when <option>configFile</option> is overridden.
when {option}`configFile` is overridden.
'';
};
@@ -457,27 +457,27 @@ in
adminAddr = mkOption {
type = types.str;
example = "admin@example.org";
description = "E-mail address of the server administrator.";
description = lib.mdDoc "E-mail address of the server administrator.";
};
logFormat = mkOption {
type = types.str;
default = "common";
example = "combined";
description = ''
description = lib.mdDoc ''
Log format for log files. Possible values are: combined, common, referer, agent, none.
See <link xlink:href="https://httpd.apache.org/docs/2.4/logs.html"/> for more details.
See <https://httpd.apache.org/docs/2.4/logs.html> for more details.
'';
};
logPerVirtualHost = mkOption {
type = types.bool;
default = true;
description = ''
description = lib.mdDoc ''
If enabled, each virtual host gets its own
<filename>access.log</filename> and
<filename>error.log</filename>, namely suffixed by the
<option>hostName</option> of the virtual host.
{file}`access.log` and
{file}`error.log`, namely suffixed by the
{option}`hostName` of the virtual host.
'';
};
@@ -498,7 +498,7 @@ in
group = mkOption {
type = types.str;
default = "wwwrun";
description = ''
description = lib.mdDoc ''
Group under which httpd children processes run.
'';
};
@@ -506,7 +506,7 @@ in
logDir = mkOption {
type = types.path;
default = "/var/log/httpd";
description = ''
description = lib.mdDoc ''
Directory for Apache's log files. It is created automatically.
'';
};
@@ -537,7 +537,7 @@ in
};
}
'';
description = ''
description = lib.mdDoc ''
Specification of the virtual hosts served by Apache. Each
element should be an attribute set specifying the
configuration of the virtual host.
@@ -547,20 +547,20 @@ in
enableMellon = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the mod_auth_mellon module.";
description = lib.mdDoc "Whether to enable the mod_auth_mellon module.";
};
enablePHP = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the PHP module.";
description = lib.mdDoc "Whether to enable the PHP module.";
};
phpPackage = mkOption {
type = types.package;
default = pkgs.php;
defaultText = literalExpression "pkgs.php";
description = ''
description = lib.mdDoc ''
Overridable attribute of the PHP package to use.
'';
};
@@ -568,7 +568,7 @@ in
enablePerl = mkOption {
type = types.bool;
default = false;
description = "Whether to enable the Perl module (mod_perl).";
description = lib.mdDoc "Whether to enable the Perl module (mod_perl).";
};
phpOptions = mkOption {
@@ -578,8 +578,8 @@ in
''
date.timezone = "CET"
'';
description = ''
Options appended to the PHP configuration file <filename>php.ini</filename>.
description = lib.mdDoc ''
Options appended to the PHP configuration file {file}`php.ini`.
'';
};
@@ -588,13 +588,13 @@ in
default = "event";
example = "worker";
description =
''
lib.mdDoc ''
Multi-processing module to be used by Apache. Available
modules are <literal>prefork</literal> (handles each
request in a separate child process), <literal>worker</literal>
modules are `prefork` (handles each
request in a separate child process), `worker`
(hybrid approach that starts a number of child processes
each running a number of threads) and <literal>event</literal>
(the default; a recent variant of <literal>worker</literal>
each running a number of threads) and `event`
(the default; a recent variant of `worker`
that handles persistent connections more efficiently).
'';
};
@@ -603,14 +603,14 @@ in
type = types.int;
default = 150;
example = 8;
description = "Maximum number of httpd processes (prefork)";
description = lib.mdDoc "Maximum number of httpd processes (prefork)";
};
maxRequestsPerChild = mkOption {
type = types.int;
default = 0;
example = 500;
description = ''
description = lib.mdDoc ''
Maximum number of httpd requests answered per httpd child (prefork), 0 means unlimited.
'';
};
@@ -618,14 +618,14 @@ in
sslCiphers = mkOption {
type = types.str;
default = "HIGH:!aNULL:!MD5:!EXP";
description = "Cipher Suite available for negotiation in SSL proxy handshake.";
description = lib.mdDoc "Cipher Suite available for negotiation in SSL proxy handshake.";
};
sslProtocols = mkOption {
type = types.str;
default = "All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1";
example = "All -SSLv2 -SSLv3";
description = "Allowed SSL/TLS protocol versions.";
description = lib.mdDoc "Allowed SSL/TLS protocol versions.";
};
};

View File

@@ -8,14 +8,14 @@ in
hostName = mkOption {
type = types.str;
default = name;
description = "Canonical hostname for the server.";
description = lib.mdDoc "Canonical hostname for the server.";
};
serverAliases = mkOption {
type = types.listOf types.str;
default = [];
example = ["www.example.org" "www.example.org:8080" "example.org"];
description = ''
description = lib.mdDoc ''
Additional names of virtual hosts served by this virtual host configuration.
'';
};
@@ -25,17 +25,17 @@ in
options = {
port = mkOption {
type = types.port;
description = "Port to listen on";
description = lib.mdDoc "Port to listen on";
};
ip = mkOption {
type = types.str;
default = "*";
description = "IP to listen on. 0.0.0.0 for IPv4 only, * for all.";
description = lib.mdDoc "IP to listen on. 0.0.0.0 for IPv4 only, * for all.";
};
ssl = mkOption {
type = types.bool;
default = false;
description = "Whether to enable SSL (https) support.";
description = lib.mdDoc "Whether to enable SSL (https) support.";
};
};
}));
@@ -61,9 +61,9 @@ in
listenAddresses = mkOption {
type = with types; nonEmptyListOf str;
description = ''
description = lib.mdDoc ''
Listen addresses for this virtual host.
Compared to <literal>listen</literal> this only sets the addreses
Compared to `listen` this only sets the addreses
and the ports are chosen automatically.
'';
default = [ "*" ];
@@ -79,9 +79,9 @@ in
addSSL = mkOption {
type = types.bool;
default = false;
description = ''
description = lib.mdDoc ''
Whether to enable HTTPS in addition to plain HTTP. This will set defaults for
<literal>listen</literal> to listen on all interfaces on the respective default
`listen` to listen on all interfaces on the respective default
ports (80, 443).
'';
};
@@ -89,19 +89,19 @@ in
onlySSL = mkOption {
type = types.bool;
default = false;
description = ''
description = lib.mdDoc ''
Whether to enable HTTPS and reject plain HTTP connections. This will set
defaults for <literal>listen</literal> to listen on all interfaces on port 443.
defaults for `listen` to listen on all interfaces on port 443.
'';
};
forceSSL = mkOption {
type = types.bool;
default = false;
description = ''
description = lib.mdDoc ''
Whether to add a separate nginx server block that permanently redirects (301)
all plain HTTP traffic to HTTPS. This will set defaults for
<literal>listen</literal> to listen on all interfaces on the respective default
`listen` to listen on all interfaces on the respective default
ports (80, 443), where the non-SSL listens are used for the redirect vhosts.
'';
};
@@ -109,9 +109,9 @@ in
enableACME = mkOption {
type = types.bool;
default = false;
description = ''
description = lib.mdDoc ''
Whether to ask Let's Encrypt to sign a certificate for this vhost.
Alternately, you can use an existing certificate through <option>useACMEHost</option>.
Alternately, you can use an existing certificate through {option}`useACMEHost`.
'';
};
@@ -130,7 +130,7 @@ in
acmeRoot = mkOption {
type = types.nullOr types.str;
default = "/var/lib/acme/acme-challenge";
description = ''
description = lib.mdDoc ''
Directory for the acme challenge which is PUBLIC, don't put certs or keys in here.
Set to null to inherit from config.security.acme.
'';
@@ -139,28 +139,28 @@ in
sslServerCert = mkOption {
type = types.path;
example = "/var/host.cert";
description = "Path to server SSL certificate.";
description = lib.mdDoc "Path to server SSL certificate.";
};
sslServerKey = mkOption {
type = types.path;
example = "/var/host.key";
description = "Path to server SSL certificate key.";
description = lib.mdDoc "Path to server SSL certificate key.";
};
sslServerChain = mkOption {
type = types.nullOr types.path;
default = null;
example = "/var/ca.pem";
description = "Path to server SSL chain file.";
description = lib.mdDoc "Path to server SSL chain file.";
};
http2 = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable HTTP 2. HTTP/2 is supported in all multi-processing modules that come with httpd. <emphasis>However, if you use the prefork mpm, there will
be severe restrictions.</emphasis> Refer to <link xlink:href="https://httpd.apache.org/docs/2.4/howto/http2.html#mpm-config"/> for details.
description = lib.mdDoc ''
Whether to enable HTTP 2. HTTP/2 is supported in all multi-processing modules that come with httpd. *However, if you use the prefork mpm, there will
be severe restrictions.* Refer to <https://httpd.apache.org/docs/2.4/howto/http2.html#mpm-config> for details.
'';
};
@@ -168,14 +168,14 @@ in
type = types.nullOr types.str;
default = null;
example = "admin@example.org";
description = "E-mail address of the server administrator.";
description = lib.mdDoc "E-mail address of the server administrator.";
};
documentRoot = mkOption {
type = types.nullOr types.path;
default = null;
example = "/data/webserver/docs";
description = ''
description = lib.mdDoc ''
The path of Apache's document root directory. If left undefined,
an empty directory in the Nix store will be used as root.
'';
@@ -189,7 +189,7 @@ in
dir = "/home/eelco/Dev/nix-homepage";
}
];
description = ''
description = lib.mdDoc ''
This option provides a simple way to serve static directories.
'';
};
@@ -222,7 +222,7 @@ in
AllowOverride All
</Directory>
'';
description = ''
description = lib.mdDoc ''
These lines go to httpd.conf verbatim. They will go after
directories and directory aliases defined by default.
'';
@@ -231,9 +231,9 @@ in
enableUserDir = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable serving <filename>~/public_html</filename> as
<literal>/~«username»</literal>.
description = lib.mdDoc ''
Whether to enable serving {file}`~/public_html` as
`/~«username»`.
'';
};
@@ -241,7 +241,7 @@ in
type = types.nullOr types.str;
default = null;
example = "http://newserver.example.org/";
description = ''
description = lib.mdDoc ''
If set, all requests for this host are redirected permanently to
the given URL.
'';
@@ -251,7 +251,7 @@ in
type = types.str;
default = "common";
example = "combined";
description = ''
description = lib.mdDoc ''
Log format for Apache's log files. Possible values are: combined, common, referer, agent.
'';
};
@@ -260,8 +260,8 @@ in
type = types.lines;
default = "";
example = "Disallow: /foo/";
description = ''
Specification of pages to be ignored by web crawlers. See <link xlink:href="http://www.robotstxt.org/"/> for details.
description = lib.mdDoc ''
Specification of pages to be ignored by web crawlers. See <http://www.robotstxt.org/> for details.
'';
};
@@ -278,8 +278,8 @@ in
};
};
'';
description = ''
Declarative location config. See <link xlink:href="https://httpd.apache.org/docs/2.4/mod/core.html#location"/> for details.
description = lib.mdDoc ''
Declarative location config. See <https://httpd.apache.org/docs/2.4/mod/core.html#location> for details.
'';
};