mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +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:
parent
52b0ad17e3
commit
2e751c0772
1050 changed files with 9605 additions and 9605 deletions
|
@ -34,32 +34,32 @@ let
|
|||
enable = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = "Whether to enable this buildkite agent";
|
||||
description = lib.mdDoc "Whether to enable this buildkite agent";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.buildkite-agent;
|
||||
defaultText = literalExpression "pkgs.buildkite-agent";
|
||||
description = "Which buildkite-agent derivation to use";
|
||||
description = lib.mdDoc "Which buildkite-agent derivation to use";
|
||||
type = types.package;
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
default = "/var/lib/buildkite-agent-${name}";
|
||||
description = "The workdir for the agent";
|
||||
description = lib.mdDoc "The workdir for the agent";
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
runtimePackages = mkOption {
|
||||
default = [ pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix ];
|
||||
defaultText = literalExpression "[ pkgs.bash pkgs.gnutar pkgs.gzip pkgs.git pkgs.nix ]";
|
||||
description = "Add programs to the buildkite-agent environment";
|
||||
description = lib.mdDoc "Add programs to the buildkite-agent environment";
|
||||
type = types.listOf types.package;
|
||||
};
|
||||
|
||||
tokenPath = mkOption {
|
||||
type = types.path;
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
The token from your Buildkite "Agents" page.
|
||||
|
||||
A run-time path to the token file, which is supposed to be provisioned
|
||||
|
@ -70,7 +70,7 @@ let
|
|||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "%hostname-${name}-%n";
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
The name of the agent as seen in the buildkite dashboard.
|
||||
'';
|
||||
};
|
||||
|
@ -79,7 +79,7 @@ let
|
|||
type = types.attrsOf (types.either types.str (types.listOf types.str));
|
||||
default = {};
|
||||
example = { queue = "default"; docker = "true"; ruby2 ="true"; };
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Tags for the agent.
|
||||
'';
|
||||
};
|
||||
|
@ -88,7 +88,7 @@ let
|
|||
type = types.lines;
|
||||
default = "";
|
||||
example = "debug=true";
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Extra lines to be added verbatim to the configuration file.
|
||||
'';
|
||||
};
|
||||
|
@ -100,7 +100,7 @@ let
|
|||
## don't end up in the Nix store.
|
||||
apply = final: if final == null then null else toString final;
|
||||
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
OpenSSH private key
|
||||
|
||||
A run-time path to the key file, which is supposed to be provisioned
|
||||
|
@ -169,9 +169,9 @@ let
|
|||
type = types.path;
|
||||
default = hooksDir config;
|
||||
defaultText = literalDocBook "generated from <option>services.buildkite-agents.<name>.hooks</option>";
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Path to the directory storing the hooks.
|
||||
Consider using <option>services.buildkite-agents.<name>.hooks.<name></option>
|
||||
Consider using {option}`services.buildkite-agents.<name>.hooks.<name>`
|
||||
instead.
|
||||
'';
|
||||
};
|
||||
|
@ -180,7 +180,7 @@ let
|
|||
type = types.str;
|
||||
default = "${pkgs.bash}/bin/bash -e -c";
|
||||
defaultText = literalExpression ''"''${pkgs.bash}/bin/bash -e -c"'';
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Command that buildkite-agent 3 will execute when it spawns a shell.
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue