lib/options: add mdDoc support to mkEnableOption

This commit is contained in:
pennae 2022-08-28 21:44:38 +02:00
parent adf66cc313
commit 9bb82c35b7

View file

@ -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;
};