diff options
author | pennae <github@quasiparticle.net> | 2022-07-28 23:19:15 +0200 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2022-07-30 15:16:34 +0200 |
commit | 2e751c0772b9d48ff6923569adfa661b030ab6a2 (patch) | |
tree | 0accd740380b7b7fe3ea5965a3a4517674e79260 /nixos/modules/services/monitoring/netdata.nix | |
parent | 52b0ad17e3727fe0c3ca028787128ede5fb86352 (diff) | |
download | nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.gz nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.bz2 nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.lz nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.xz nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.tar.zst nixlib-2e751c0772b9d48ff6923569adfa661b030ab6a2.zip |
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.
Diffstat (limited to 'nixos/modules/services/monitoring/netdata.nix')
-rw-r--r-- | nixos/modules/services/monitoring/netdata.nix | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/nixos/modules/services/monitoring/netdata.nix b/nixos/modules/services/monitoring/netdata.nix index baf869af1c42..4fd07a4ba143 100644 --- a/nixos/modules/services/monitoring/netdata.nix +++ b/nixos/modules/services/monitoring/netdata.nix @@ -55,24 +55,24 @@ in { type = types.package; default = pkgs.netdata; defaultText = literalExpression "pkgs.netdata"; - description = "Netdata package to use."; + description = lib.mdDoc "Netdata package to use."; }; user = mkOption { type = types.str; default = "netdata"; - description = "User account under which netdata runs."; + description = lib.mdDoc "User account under which netdata runs."; }; group = mkOption { type = types.str; default = "netdata"; - description = "Group under which netdata runs."; + description = lib.mdDoc "Group under which netdata runs."; }; configText = mkOption { type = types.nullOr types.lines; - description = "Verbatim netdata.conf, cannot be combined with config."; + description = lib.mdDoc "Verbatim netdata.conf, cannot be combined with config."; default = null; example = '' [global] @@ -86,7 +86,7 @@ in { enable = mkOption { type = types.bool; default = true; - description = '' + description = lib.mdDoc '' Whether to enable python-based plugins ''; }; @@ -101,7 +101,7 @@ in { ps.dnspython ] ''; - description = '' + description = lib.mdDoc '' Extra python packages available at runtime to enable additional python plugins. ''; @@ -129,7 +129,7 @@ in { config = mkOption { type = types.attrsOf types.attrs; default = {}; - description = "netdata.conf configuration as nix attributes. cannot be combined with configText."; + description = lib.mdDoc "netdata.conf configuration as nix attributes. cannot be combined with configText."; example = literalExpression '' global = { "debug log" = "syslog"; @@ -142,7 +142,7 @@ in { configDir = mkOption { type = types.attrsOf types.path; default = {}; - description = '' + description = lib.mdDoc '' Complete netdata config directory except netdata.conf. The default configuration is merged with changes defined in this option. @@ -162,11 +162,11 @@ in { enableAnalyticsReporting = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Enable reporting of anonymous usage statistics to Netdata Inc. via either Google Analytics (in versions prior to 1.29.4), or Netdata Inc.'s self-hosted PostHog (in versions 1.29.4 and later). - See: <link xlink:href="https://learn.netdata.cloud/docs/agent/anonymous-statistics"/> + See: <https://learn.netdata.cloud/docs/agent/anonymous-statistics> ''; }; }; |