about summary refs log tree commit diff
path: root/nixos/modules/virtualisation/lxd.nix
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2022-07-28 23:19:15 +0200
committerpennae <github@quasiparticle.net>2022-07-30 15:16:34 +0200
commit2e751c0772b9d48ff6923569adfa661b030ab6a2 (patch)
tree0accd740380b7b7fe3ea5965a3a4517674e79260 /nixos/modules/virtualisation/lxd.nix
parent52b0ad17e3727fe0c3ca028787128ede5fb86352 (diff)
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/virtualisation/lxd.nix')
-rw-r--r--nixos/modules/virtualisation/lxd.nix10
1 files changed, 5 insertions, 5 deletions
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.