This commit is contained in:
Lucy Hochkamp 2025-11-21 13:32:44 +01:00
parent 2614910b6f
commit 4667974392
13 changed files with 313 additions and 415 deletions

View file

@ -36,6 +36,11 @@ let
in
result;
deref = x: if x ? "$ref" then getRef x."$ref" else x;
fileSubmod = types.submodule {
options.path = mkOption {
type = types.pathWith { inStore = false; absolute = true; };
};
};
buildOptionType =
{
spec,
@ -43,7 +48,8 @@ let
...
}:
let
strType = if spec ? enum then types.enum spec.enum else types.str;
strType = if spec ? enum then types.enum spec.enum else (types.either types.str fileSubmod);
objType = types.submodule {
freeformType = json.type;
options = submoduleOptions { inherit spec depth; };