From 9bb82c35b750b5ffdebb906b696b135ef028b4f6 Mon Sep 17 00:00:00 2001 From: pennae Date: Sun, 28 Aug 2022 21:44:38 +0200 Subject: [PATCH] lib/options: add mdDoc support to mkEnableOption --- lib/options.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/options.nix b/lib/options.nix index 84d9fd5e15de..b6376796dbac 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -95,7 +95,10 @@ rec { name: mkOption { default = false; example = true; - description = "Whether to enable ${name}."; + description = + if name ? _type && name._type == "mdDoc" + then lib.mdDoc "Whether to enable ${name.text}." + else "Whether to enable ${name}."; type = lib.types.bool; };