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:
@@ -27,7 +27,7 @@ in {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Whether to use ConnMan for managing your network connections.
|
||||
'';
|
||||
};
|
||||
@@ -35,7 +35,7 @@ in {
|
||||
enableVPN = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Whether to enable ConnMan VPN service.
|
||||
'';
|
||||
};
|
||||
@@ -43,7 +43,7 @@ in {
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Configuration lines appended to the generated connman configuration file.
|
||||
'';
|
||||
};
|
||||
@@ -51,7 +51,7 @@ in {
|
||||
networkInterfaceBlacklist = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ "vmnet" "vboxnet" "virbr" "ifb" "ve" ];
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Default blacklisted interfaces, this includes NixOS containers interfaces (ve).
|
||||
'';
|
||||
};
|
||||
@@ -60,9 +60,9 @@ in {
|
||||
backend = mkOption {
|
||||
type = types.enum [ "wpa_supplicant" "iwd" ];
|
||||
default = "wpa_supplicant";
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Specify the Wi-Fi backend used.
|
||||
Currently supported are <option>wpa_supplicant</option> or <option>iwd</option>.
|
||||
Currently supported are {option}`wpa_supplicant` or {option}`iwd`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
@@ -71,14 +71,14 @@ in {
|
||||
type = with types; listOf str;
|
||||
default = [ ];
|
||||
example = [ "--nodnsproxy" ];
|
||||
description = ''
|
||||
description = lib.mdDoc ''
|
||||
Extra flags to pass to connmand
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
description = "The connman package / build flavor";
|
||||
description = lib.mdDoc "The connman package / build flavor";
|
||||
default = connman;
|
||||
defaultText = literalExpression "pkgs.connman";
|
||||
example = literalExpression "pkgs.connmanFull";
|
||||
|
||||
Reference in New Issue
Block a user