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

@ -28,32 +28,32 @@ in {
private = mkOption {
type = types.bool;
default = false;
description = ''
description = lib.mdDoc ''
Make your shout instance private. You will need to configure user
accounts by adding entries in <filename>${shoutHome}/users</filename>.
accounts by adding entries in {file}`${shoutHome}/users`.
'';
};
listenAddress = mkOption {
type = types.str;
default = "0.0.0.0";
description = "IP interface to listen on for http connections.";
description = lib.mdDoc "IP interface to listen on for http connections.";
};
port = mkOption {
type = types.port;
default = 9000;
description = "TCP port to listen on for http connections.";
description = lib.mdDoc "TCP port to listen on for http connections.";
};
configFile = mkOption {
type = types.nullOr types.lines;
default = null;
description = ''
Contents of Shout's <filename>config.js</filename> file.
description = lib.mdDoc ''
Contents of Shout's {file}`config.js` file.
Used for backward compatibility, recommended way is now to use
the <literal>config</literal> option.
the `config` option.
Documentation: http://shout-irc.com/docs/server/configuration.html
'';
@ -70,8 +70,8 @@ in {
port = 6697;
};
};
description = ''
Shout <filename>config.js</filename> contents as attribute set (will be
description = lib.mdDoc ''
Shout {file}`config.js` contents as attribute set (will be
converted to JSON to generate the configuration file).
The options defined here will be merged to the default configuration file.