lib/options: add defaultNullOpts.mkProportion

This commit is contained in:
Gaetan Lepage 2025-01-03 23:09:12 +01:00
parent 4f4917be69
commit 2e600f5796

View file

@ -167,6 +167,8 @@ rec {
mkNum' = args: mkNullableWithRaw' (args // { type = types.number; });
mkNum = pluginDefault: description: mkNum' { inherit pluginDefault description; };
mkProportion' = args: mkNullableWithRaw' (args // { type = types.numbers.between 0.0 1.0; });
mkProportion = pluginDefault: description: mkProportion' { inherit pluginDefault description; };
mkInt' = args: mkNullableWithRaw' (args // { type = types.int; });
mkInt = pluginDefault: description: mkNum' { inherit pluginDefault description; };
# Positive: >0