diff options
Diffstat (limited to 'lib/modules.nix')
-rw-r--r-- | lib/modules.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/modules.nix b/lib/modules.nix index c304d5b9afd3..5e6bee6aabe3 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -1113,7 +1113,6 @@ rec { visible = true; warn = false; use = id; - wrapDescription = lib.id; }; /* Transitional version of mkAliasOptionModule that uses MD docs. */ @@ -1122,6 +1121,7 @@ rec { visible = true; warn = false; use = id; + markdown = true; }; /* mkDerivedConfig : Option a -> (a -> Definition b) -> Definition b @@ -1144,7 +1144,7 @@ rec { (opt.highestPrio or defaultOverridePriority) (f opt.value); - doRename = { from, to, visible, warn, use, withPriority ? true, wrapDescription ? lib.mdDoc }: + doRename = { from, to, visible, warn, use, withPriority ? true, markdown ? false }: { config, options, ... }: let fromOpt = getAttrFromPath from options; @@ -1155,7 +1155,9 @@ rec { { options = setAttrByPath from (mkOption { inherit visible; - description = wrapDescription "Alias of {option}`${showOption to}`."; + description = if markdown + then lib.mdDoc "Alias of {option}`${showOption to}`." + else "Alias of <option>${showOption to}</option>."; apply = x: use (toOf config); } // optionalAttrs (toType != null) { type = toType; |