From b96a4dcc6079e9c7ea94f9f06b7399a4e10a9e05 Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Sat, 9 May 2020 17:24:59 +0100 Subject: uwsgi: make instance configuration deeply mergeable allows to specify independent uwsgi instances in two modules. --- nixos/modules/services/web-servers/uwsgi.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/web-servers/uwsgi.nix b/nixos/modules/services/web-servers/uwsgi.nix index 4b74c329e3d..936e211ec71 100644 --- a/nixos/modules/services/web-servers/uwsgi.nix +++ b/nixos/modules/services/web-servers/uwsgi.nix @@ -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"; }; -- cgit 1.4.1