From 2e751c0772b9d48ff6923569adfa661b030ab6a2 Mon Sep 17 00:00:00 2001 From: pennae Date: Thu, 28 Jul 2022 23:19:15 +0200 Subject: 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 and , so any option using such tags will not be converted at all. --- nixos/modules/virtualisation/lxd.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nixos/modules/virtualisation/lxd.nix') diff --git a/nixos/modules/virtualisation/lxd.nix b/nixos/modules/virtualisation/lxd.nix index 18451b147ff53..f1eabee5ffaf3 100644 --- a/nixos/modules/virtualisation/lxd.nix +++ b/nixos/modules/virtualisation/lxd.nix @@ -36,7 +36,7 @@ in { type = types.package; default = pkgs.lxd; defaultText = literalExpression "pkgs.lxd"; - description = '' + description = lib.mdDoc '' The LXD package to use. ''; }; @@ -45,7 +45,7 @@ in { type = types.package; default = pkgs.lxc; defaultText = literalExpression "pkgs.lxc"; - description = '' + description = lib.mdDoc '' The LXC package to use with LXD (required for AppArmor profiles). ''; }; @@ -54,7 +54,7 @@ in { type = types.bool; default = config.boot.zfs.enabled; defaultText = literalExpression "config.boot.zfs.enabled"; - description = '' + description = lib.mdDoc '' Enables lxd to use zfs as a storage for containers. This option is enabled by default if a zfs pool is configured @@ -65,7 +65,7 @@ in { recommendedSysctlSettings = mkOption { type = types.bool; default = false; - description = '' + description = lib.mdDoc '' Enables various settings to avoid common pitfalls when running containers requiring many file operations. Fixes errors like "Too many open files" or @@ -79,7 +79,7 @@ in { type = types.int; default = 600; apply = toString; - description = '' + description = lib.mdDoc '' Time to wait (in seconds) for LXD to become ready to process requests. If LXD does not reply within the configured time, lxd.service will be considered failed and systemd will attempt to restart it. -- cgit 1.4.1