nixos/strongswan: convert to MD descriptions

no changes to the manpage output. the html output changes, but only by
whitespace.
This commit is contained in:
pennae 2022-08-20 18:19:32 +02:00 committed by pennae
parent d9a636e9c6
commit a2ceee8ffe
2 changed files with 242 additions and 302 deletions

View file

@ -57,12 +57,12 @@ rec {
documentDefault = description : strongswanDefault :
if strongswanDefault == null
then description
else description + ''
then mdDoc description
else mdDoc (description + ''
StrongSwan default: <literal><![CDATA[${builtins.toJSON strongswanDefault}]]></literal>
'';
StrongSwan default: ````${builtins.toJSON strongswanDefault}````
'');
single = f: name: value: { ${name} = f value; };
@ -121,7 +121,7 @@ rec {
option = mkOption {
type = types.attrsOf option;
default = {};
inherit description;
description = mdDoc description;
};
render = single (attrs:
(paramsToRenderedStrings attrs
@ -139,7 +139,7 @@ rec {
option = mkOption {
type = types.attrsOf option;
default = {};
inherit description;
description = mdDoc description;
};
render = prefix: attrs:
let prefixedAttrs = mapAttrs' (name: nameValuePair "${prefix}-${name}") attrs;