nixos/below: Explicitely mark descriptions as using Markdown

This commit is contained in:
nicoo 2023-05-26 16:44:44 +00:00
parent 405e1f1e54
commit 942f0a01fe

View file

@ -13,12 +13,13 @@ let
mkDisableOption = n: mkOption { mkDisableOption = n: mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = "Whether to enable ${n}."; description = mdDoc "Whether to enable ${n}.";
}; };
optionalType = ty: x: mkOption ({ optionalType = ty: x: mkOption (x // {
description = mdDoc x.description;
type = (types.nullOr ty); type = (types.nullOr ty);
default = null; default = null;
} // x); });
optionalPath = optionalType types.path; optionalPath = optionalType types.path;
optionalStr = optionalType types.str; optionalStr = optionalType types.str;
optionalInt = optionalType types.int; optionalInt = optionalType types.int;
@ -33,13 +34,13 @@ in {
}; };
collect = { collect = {
diskStats = mkDisableOption "dist_stat collection"; diskStats = mkDisableOption "dist_stat collection";
ioStats = mkEnableOption "io.stat collection for cgroups"; ioStats = mkEnableOption (mdDoc "io.stat collection for cgroups");
exitStats = mkDisableOption "eBPF-based exitstats"; exitStats = mkDisableOption "eBPF-based exitstats";
}; };
compression.enable = mkEnableOption "data compression"; compression.enable = mkEnableOption (mdDoc "data compression");
retention = { retention = {
size = optionalInt { size = optionalInt {
description = mdDoc '' description = ''
Size limit for below's data, in bytes. Data is deleted oldest-first, in 24h 'shards'. Size limit for below's data, in bytes. Data is deleted oldest-first, in 24h 'shards'.
::: {.note} ::: {.note}
@ -50,7 +51,7 @@ in {
''; '';
}; };
time = optionalInt { time = optionalInt {
description = mdDoc '' description = ''
Retention time, in seconds. Retention time, in seconds.
::: {.note} ::: {.note}