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

@ -49,13 +49,13 @@ in
type = types.package;
default = pkgs.vault;
defaultText = literalExpression "pkgs.vault";
description = "This option specifies the vault package to use.";
description = lib.mdDoc "This option specifies the vault package to use.";
};
dev = mkOption {
type = types.bool;
default = false;
description = ''
description = lib.mdDoc ''
In this mode, Vault runs in-memory and starts unsealed. This option is not meant production but for development and testing i.e. for nixos tests.
'';
};
@ -63,29 +63,29 @@ in
devRootTokenID = mkOption {
type = types.str;
default = false;
description = ''
Initial root token. This only applies when <option>services.vault.dev</option> is true
description = lib.mdDoc ''
Initial root token. This only applies when {option}`services.vault.dev` is true
'';
};
address = mkOption {
type = types.str;
default = "127.0.0.1:8200";
description = "The name of the ip interface to listen to";
description = lib.mdDoc "The name of the ip interface to listen to";
};
tlsCertFile = mkOption {
type = types.nullOr types.str;
default = null;
example = "/path/to/your/cert.pem";
description = "TLS certificate file. TLS will be disabled unless this option is set";
description = lib.mdDoc "TLS certificate file. TLS will be disabled unless this option is set";
};
tlsKeyFile = mkOption {
type = types.nullOr types.str;
default = null;
example = "/path/to/your/key.pem";
description = "TLS private key file. TLS will be disabled unless this option is set";
description = lib.mdDoc "TLS private key file. TLS will be disabled unless this option is set";
};
listenerExtraConfig = mkOption {
@ -93,13 +93,13 @@ in
default = ''
tls_min_version = "tls12"
'';
description = "Extra text appended to the listener section.";
description = lib.mdDoc "Extra text appended to the listener section.";
};
storageBackend = mkOption {
type = types.enum [ "inmem" "file" "consul" "zookeeper" "s3" "azure" "dynamodb" "etcd" "mssql" "mysql" "postgresql" "swift" "gcs" "raft" ];
default = "inmem";
description = "The name of the type of storage backend";
description = lib.mdDoc "The name of the type of storage backend";
};
storagePath = mkOption {
@ -110,7 +110,7 @@ in
then "/var/lib/vault"
else null
'';
description = "Data directory for file backend";
description = lib.mdDoc "Data directory for file backend";
};
storageConfig = mkOption {
@ -129,13 +129,13 @@ in
telemetryConfig = mkOption {
type = types.lines;
default = "";
description = "Telemetry configuration";
description = lib.mdDoc "Telemetry configuration";
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = "Extra text appended to <filename>vault.hcl</filename>.";
description = lib.mdDoc "Extra text appended to {file}`vault.hcl`.";
};
extraSettingsPaths = mkOption {