From a572d5151ca4c9bb67f668fa5644800302b50a22 Mon Sep 17 00:00:00 2001 From: Justinas Stankevicius Date: Sun, 20 Nov 2022 19:58:49 +0200 Subject: [PATCH] nixos/prometheus-nginxlog-exporter: define types of inner options --- .../prometheus/exporters/nginxlog.nix | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/monitoring/prometheus/exporters/nginxlog.nix b/nixos/modules/services/monitoring/prometheus/exporters/nginxlog.nix index 2b4fd12895a3..63d25f3d88fb 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/nginxlog.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/nginxlog.nix @@ -7,7 +7,27 @@ in { port = 9117; extraOpts = { settings = mkOption { - type = types.attrs; + type = types.submodule { + options = { + consul = mkOption { + default = null; + type = types.nullOr (types.attrsOf types.anything); + description = '' + Consul integration options. For more information see the [example config](https://github.com/martin-helmich/prometheus-nginxlog-exporter#configuration-file). + + This is disabled by default. + ''; + }; + namespaces = mkOption { + default = []; + type = types.listOf (types.attrsOf types.anything); + + description = '' + Namespaces to collect the metrics for. For more information see the [example config](https://github.com/martin-helmich/prometheus-nginxlog-exporter#configuration-file). + ''; + }; + }; + }; default = {}; description = '' All settings of nginxlog expressed as an Nix attrset.