nixos/promtail: use json type for configuration

This commit is contained in:
Jörg Thalheim 2020-11-10 10:28:06 +01:00
parent 689eb49d42
commit 88d1da8e5d
No known key found for this signature in database
GPG key ID: 003F2096411B5F92

View file

@ -11,20 +11,7 @@ in {
enable = mkEnableOption "the Promtail ingresser";
configuration = mkOption {
type = with lib.types; let
valueType = nullOr (oneOf [
bool
int
float
str
(lazyAttrsOf valueType)
(listOf valueType)
]) // {
description = "JSON value";
emptyValue.value = {};
deprecationMessage = null;
};
in valueType;
type = (pkgs.formats.json {}).type;
description = ''
Specify the configuration for Promtail in Nix.
'';