uwsgi: make instance configuration deeply mergeable

allows to specify independent uwsgi instances in two modules.
This commit is contained in:
Jörg Thalheim 2020-05-09 17:24:59 +01:00
parent c956b591b4
commit b96a4dcc60
No known key found for this signature in database
GPG key ID: 003F2096411B5F92

View file

@ -79,7 +79,25 @@ in {
};
instance = mkOption {
type = types.attrs;
type = with lib.types; let
valueType = nullOr (oneOf [
bool
int
float
str
(lazyAttrsOf valueType)
(listOf valueType)
(mkOptionType {
name = "function";
description = "function";
check = x: isFunction x;
merge = mergeOneOption;
})
]) // {
description = "Json value or lambda";
emptyValue.value = {};
};
in valueType;
default = {
type = "normal";
};