forked from clan/clan-core
Inventory: add concrete use-case examples
This commit is contained in:
parent
fd9ad38900
commit
294c5548b9
@ -47,7 +47,7 @@ rec {
|
|||||||
let
|
let
|
||||||
evaled = lib.evalModules { modules = [ module ]; };
|
evaled = lib.evalModules { modules = [ module ]; };
|
||||||
in
|
in
|
||||||
parseOptions evaled.options;
|
{ "$schema" = "http://json-schema.org/draft-07/schema#"; } // parseOptions evaled.options;
|
||||||
|
|
||||||
# parses a set of evaluated nixos options to a jsonschema
|
# parses a set of evaluated nixos options to a jsonschema
|
||||||
parseOptions =
|
parseOptions =
|
||||||
@ -66,6 +66,7 @@ rec {
|
|||||||
// {
|
// {
|
||||||
type = "object";
|
type = "object";
|
||||||
inherit properties;
|
inherit properties;
|
||||||
|
additionalProperties = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# parses and evaluated nixos option to a jsonschema property definition
|
# parses and evaluated nixos option to a jsonschema property definition
|
||||||
|
@ -59,9 +59,8 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": ["repo"],
|
||||||
"repo"
|
"additionalProperties": false,
|
||||||
],
|
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"default": {},
|
"default": {},
|
||||||
|
Loading…
Reference in New Issue
Block a user