From 2851a22d4e08a1809dfec3801c7049e69cb4194b Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Tue, 24 Sep 2024 11:42:11 +0700 Subject: [PATCH] podman: metrics only enabled when telemetry is enabled --- system/podman/metrics.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/podman/metrics.nix b/system/podman/metrics.nix index 1afc9a3..385c604 100644 --- a/system/podman/metrics.nix +++ b/system/podman/metrics.nix @@ -1,9 +1,11 @@ { config, lib, ... }: let ip = "10.88.222.222"; + cfg = config.profile.podman; + inherit (lib) mkIf; in { - virtualisation.oci-containers.containers."metrics" = { + virtualisation.oci-containers.containers."metrics" = mkIf (cfg.enable && config.profile.services.telemetry.enable) { image = "quay.io/navidys/prometheus-podman-exporter"; hostname = "metrics"; autoStart = true;