summary refs log tree commit diff
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2020-11-10 10:28:06 +0100
committerJörg Thalheim <joerg@thalheim.io>2020-11-10 10:49:23 +0100
commit88d1da8e5d94202c88d65816bb5793829f1baa7d (patch)
tree2e9c2f3bfd2ab83e7a28371a95489a5739c01273
parent689eb49d4261296acefcc175d93e77f6599b4ed9 (diff)
downloadnixpkgs-88d1da8e5d94202c88d65816bb5793829f1baa7d.tar
nixpkgs-88d1da8e5d94202c88d65816bb5793829f1baa7d.tar.gz
nixpkgs-88d1da8e5d94202c88d65816bb5793829f1baa7d.tar.bz2
nixpkgs-88d1da8e5d94202c88d65816bb5793829f1baa7d.tar.lz
nixpkgs-88d1da8e5d94202c88d65816bb5793829f1baa7d.tar.xz
nixpkgs-88d1da8e5d94202c88d65816bb5793829f1baa7d.tar.zst
nixpkgs-88d1da8e5d94202c88d65816bb5793829f1baa7d.zip
nixos/promtail: use json type for configuration
-rw-r--r--nixos/modules/services/logging/promtail.nix15
1 files changed, 1 insertions, 14 deletions
diff --git a/nixos/modules/services/logging/promtail.nix b/nixos/modules/services/logging/promtail.nix
index 834bb99bb1d..1d3e9d8e9b9 100644
--- a/nixos/modules/services/logging/promtail.nix
+++ b/nixos/modules/services/logging/promtail.nix
@@ -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.
       '';