diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2020-05-09 17:24:59 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2020-05-15 08:53:31 +0100 |
commit | b96a4dcc6079e9c7ea94f9f06b7399a4e10a9e05 (patch) | |
tree | ab58641e4683c9930aabac50108ddee49a311f50 /nixos/modules | |
parent | c956b591b4fcba9f0ca02f24b9a0bf318771736a (diff) | |
download | nixlib-b96a4dcc6079e9c7ea94f9f06b7399a4e10a9e05.tar nixlib-b96a4dcc6079e9c7ea94f9f06b7399a4e10a9e05.tar.gz nixlib-b96a4dcc6079e9c7ea94f9f06b7399a4e10a9e05.tar.bz2 nixlib-b96a4dcc6079e9c7ea94f9f06b7399a4e10a9e05.tar.lz nixlib-b96a4dcc6079e9c7ea94f9f06b7399a4e10a9e05.tar.xz nixlib-b96a4dcc6079e9c7ea94f9f06b7399a4e10a9e05.tar.zst nixlib-b96a4dcc6079e9c7ea94f9f06b7399a4e10a9e05.zip |
uwsgi: make instance configuration deeply mergeable
allows to specify independent uwsgi instances in two modules.
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/web-servers/uwsgi.nix | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/nixos/modules/services/web-servers/uwsgi.nix b/nixos/modules/services/web-servers/uwsgi.nix index 4b74c329e3dc..936e211ec713 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"; }; |