podman: metrics only enabled when telemetry is enabled

This commit is contained in:
Tigor Hutasuhut 2024-09-24 11:42:11 +07:00
parent e93e5564df
commit 2851a22d4e

View file

@ -1,9 +1,11 @@
{ config, lib, ... }: { config, lib, ... }:
let let
ip = "10.88.222.222"; ip = "10.88.222.222";
cfg = config.profile.podman;
inherit (lib) mkIf;
in 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"; image = "quay.io/navidys/prometheus-podman-exporter";
hostname = "metrics"; hostname = "metrics";
autoStart = true; autoStart = true;