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/munin.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/munin.nix')
-rw-r--r-- | nixos/modules/services/monitoring/munin.nix | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/nixos/modules/services/monitoring/munin.nix b/nixos/modules/services/monitoring/munin.nix index 4fddb1e37e2e..c77ae7b3b6eb 100644 --- a/nixos/modules/services/monitoring/munin.nix +++ b/nixos/modules/services/monitoring/munin.nix @@ -171,7 +171,7 @@ in extraPlugins = mkOption { default = {}; type = with types; attrsOf path; - description = '' + description = lib.mdDoc '' Additional Munin plugins to activate. Keys are the name of the plugin symlink, values are the path to the underlying plugin script. You can use the same plugin script multiple times (e.g. for wildcard @@ -179,15 +179,15 @@ in Note that these plugins do not participate in autoconfiguration. If you want to autoconfigure additional plugins, use - <option>services.munin-node.extraAutoPlugins</option>. + {option}`services.munin-node.extraAutoPlugins`. Plugins enabled in this manner take precedence over autoconfigured plugins. Plugins will be copied into the Nix store, and it will attempt to modify them to run properly by fixing hardcoded references to - <literal>/bin</literal>, <literal>/usr/bin</literal>, - <literal>/sbin</literal>, and <literal>/usr/sbin</literal>. + `/bin`, `/usr/bin`, + `/sbin`, and `/usr/sbin`. ''; example = literalExpression '' { @@ -201,24 +201,24 @@ in extraAutoPlugins = mkOption { default = []; type = with types; listOf path; - description = '' + description = lib.mdDoc '' Additional Munin plugins to autoconfigure, using - <literal>munin-node-configure --suggest</literal>. These should be + `munin-node-configure --suggest`. These should be the actual paths to the plugin files (or directories containing them), not just their names. If you want to manually enable individual plugins instead, use - <option>services.munin-node.extraPlugins</option>. + {option}`services.munin-node.extraPlugins`. Note that only plugins that have the 'autoconfig' capability will do anything if listed here, since plugins that cannot autoconfigure won't be automatically enabled by - <literal>munin-node-configure</literal>. + `munin-node-configure`. Plugins will be copied into the Nix store, and it will attempt to modify them to run properly by fixing hardcoded references to - <literal>/bin</literal>, <literal>/usr/bin</literal>, - <literal>/sbin</literal>, and <literal>/usr/sbin</literal>. + `/bin`, `/usr/bin`, + `/sbin`, and `/usr/sbin`. ''; example = literalExpression '' [ @@ -234,14 +234,14 @@ in # NaNs in the output. default = [ "munin_stats" ]; type = with types; listOf str; - description = '' + description = lib.mdDoc '' Munin plugins to disable, even if - <literal>munin-node-configure --suggest</literal> tries to enable + `munin-node-configure --suggest` tries to enable them. To disable a wildcard plugin, use an actual wildcard, as in the example. munin_stats is disabled by default as it tries to read - <literal>/var/log/munin/munin-update.log</literal> for timing + `/var/log/munin/munin-update.log` for timing information, and the NixOS build of Munin does not write this file. ''; example = [ "diskstats" "zfs_usage_*" ]; @@ -253,12 +253,12 @@ in enable = mkOption { default = false; type = types.bool; - description = '' + description = lib.mdDoc '' Enable munin-cron. Takes care of all heavy lifting to collect data from nodes and draws graphs to html. Runs munin-update, munin-limits, munin-graphs and munin-html in that order. - HTML output is in <filename>/var/www/munin/</filename>, configure your + HTML output is in {file}`/var/www/munin/`, configure your favourite webserver to serve static files. ''; }; @@ -296,7 +296,7 @@ in extraCSS = mkOption { default = ""; type = types.lines; - description = '' + description = lib.mdDoc '' Custom styling for the HTML that munin-cron generates. This will be appended to the CSS files used by munin-cron and will thus take precedence over the builtin styles. |