vars: simplify validationHash type for better error messages
This commit is contained in:
@@ -79,22 +79,27 @@ in
|
|||||||
description = ''
|
description = ''
|
||||||
A set of values that invalidate the generated values.
|
A set of values that invalidate the generated values.
|
||||||
If any of these values change, the generated values will be re-generated.
|
If any of these values change, the generated values will be re-generated.
|
||||||
|
Lists are not allowed as of now due to potential ordering issues
|
||||||
'';
|
'';
|
||||||
default = null;
|
default = null;
|
||||||
type =
|
# This is more restrictive than json without lists, but currently
|
||||||
let
|
# if a value contains a list, we get an infinite recursion which
|
||||||
data = nullOr (oneOf [
|
# is hard to understand.
|
||||||
|
type = nullOr (oneOf [
|
||||||
|
bool
|
||||||
|
int
|
||||||
|
str
|
||||||
|
(attrsOf (oneOf [
|
||||||
|
bool
|
||||||
|
int
|
||||||
|
str
|
||||||
|
(attrsOf (oneOf [
|
||||||
bool
|
bool
|
||||||
int
|
int
|
||||||
str
|
str
|
||||||
(attrsOf data)
|
]))
|
||||||
# lists are not allowed as of now due to potential ordering issues
|
]))
|
||||||
]);
|
]);
|
||||||
in
|
|
||||||
data
|
|
||||||
// {
|
|
||||||
description = "JSON compatible data structure";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
# the validationHash is the validation interface to the outside world
|
# the validationHash is the validation interface to the outside world
|
||||||
validationHash = lib.mkOption {
|
validationHash = lib.mkOption {
|
||||||
|
|||||||
Reference in New Issue
Block a user