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

@ -45,7 +45,7 @@ in
package = mkOption {
type = types.package;
example = literalExpression "pkgs.postgresql_11";
description = ''
description = lib.mdDoc ''
PostgreSQL package to use.
'';
};
@ -53,7 +53,7 @@ in
port = mkOption {
type = types.int;
default = 5432;
description = ''
description = lib.mdDoc ''
The port on which PostgreSQL listens.
'';
};
@ -61,14 +61,14 @@ in
checkConfig = mkOption {
type = types.bool;
default = true;
description = "Check the syntax of the configuration file at compile time";
description = lib.mdDoc "Check the syntax of the configuration file at compile time";
};
dataDir = mkOption {
type = types.path;
defaultText = literalExpression ''"/var/lib/postgresql/''${config.services.postgresql.package.psqlSchema}"'';
example = "/var/lib/postgresql/11";
description = ''
description = lib.mdDoc ''
The data directory for PostgreSQL. If left as the default value
this directory will automatically be created before the PostgreSQL server starts, otherwise
the sysadmin is responsible for ensuring the directory exists with appropriate ownership
@ -96,7 +96,7 @@ in
identMap = mkOption {
type = types.lines;
default = "";
description = ''
description = lib.mdDoc ''
Defines the mapping from system users to database users.
The general form is:
@ -109,8 +109,8 @@ in
type = with types; listOf str;
default = [];
example = [ "--data-checksums" "--allow-group-access" ];
description = ''
Additional arguments passed to <literal>initdb</literal> during data dir
description = lib.mdDoc ''
Additional arguments passed to `initdb` during data dir
initialisation.
'';
};
@ -118,7 +118,7 @@ in
initialScript = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
description = lib.mdDoc ''
A file containing SQL statements to execute on first startup.
'';
};
@ -126,7 +126,7 @@ in
ensureDatabases = mkOption {
type = types.listOf types.str;
default = [];
description = ''
description = lib.mdDoc ''
Ensures that the specified databases exist.
This option will never delete existing databases, especially not when the value of this
option is changed. This means that databases created once through this option or
@ -143,7 +143,7 @@ in
options = {
name = mkOption {
type = types.str;
description = ''
description = lib.mdDoc ''
Name of the user to ensure.
'';
};
@ -171,7 +171,7 @@ in
};
});
default = [];
description = ''
description = lib.mdDoc ''
Ensures that the specified users exist and have at least the ensured permissions.
The PostgreSQL users will be identified using peer authentication. This authenticates the Unix user with the
same name only, and that without the need for a password.
@ -200,7 +200,7 @@ in
enableTCPIP = mkOption {
type = types.bool;
default = false;
description = ''
description = lib.mdDoc ''
Whether PostgreSQL should listen on all network interfaces.
If disabled, the database can only be accessed via its Unix
domain socket or via TCP connections to localhost.
@ -211,9 +211,9 @@ in
type = types.str;
default = "[%p] ";
example = "%m [%p] ";
description = ''
description = lib.mdDoc ''
A printf-style string that is output at the beginning of each log line.
Upstream default is <literal>'%m [%p] '</literal>, i.e. it includes the timestamp. We do
Upstream default is `'%m [%p] '`, i.e. it includes the timestamp. We do
not include the timestamp, because journal has it anyway.
'';
};
@ -222,9 +222,9 @@ in
type = types.listOf types.path;
default = [];
example = literalExpression "with pkgs.postgresql_11.pkgs; [ postgis pg_repack ]";
description = ''
description = lib.mdDoc ''
List of PostgreSQL plugins. PostgreSQL version for each plugin should
match version for <literal>services.postgresql.package</literal> value.
match version for `services.postgresql.package` value.
'';
};
@ -255,8 +255,8 @@ in
recoveryConfig = mkOption {
type = types.nullOr types.lines;
default = null;
description = ''
Contents of the <filename>recovery.conf</filename> file.
description = lib.mdDoc ''
Contents of the {file}`recovery.conf` file.
'';
};