From 75681cf8d3a020f1677499ca2350a61cffdf51dc Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 23 Feb 2025 16:02:37 +0300 Subject: [PATCH] fix: fix cube config --- hosts/cube/prometheus.nix | 6 ++++-- modules/linux/ip.nix | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hosts/cube/prometheus.nix b/hosts/cube/prometheus.nix index 66c9d60..1d199ef 100644 --- a/hosts/cube/prometheus.nix +++ b/hosts/cube/prometheus.nix @@ -21,11 +21,13 @@ in { retentionTime = "1w"; scrapeConfigs = let - configToScrapeConfig = hostName: { hostConfig, ... }: - hostConfig.services.prometheus.exporters + configToScrapeConfig = hostName: { config, ... }: let + hostConfig = config; + in hostConfig.services.prometheus.exporters |> filterAttrs (exporterName: exporterConfig: exporterName != "minio" && exporterName != "unifi-poller" && + exporterName != "tor" && exporterConfig.enable or false) |> mapAttrsToList (exporterName: exporterConfig: { job_name = "${exporterName}-${hostName}"; diff --git a/modules/linux/ip.nix b/modules/linux/ip.nix index bd39671..85b7dfe 100644 --- a/modules/linux/ip.nix +++ b/modules/linux/ip.nix @@ -7,7 +7,7 @@ in { inherit (config.networking.ipv4) address prefixLength; }]; - ipv6.addresses = optionals (config.networking.ipv4.address != null) [{ + ipv6.addresses = optionals (config.networking.ipv6.address != null) [{ inherit (config.networking.ipv6) address prefixLength; }]; };