From 16b21260331bf541444e772b0986b8f72fa306b4 Mon Sep 17 00:00:00 2001 From: Andre Date: Sat, 24 Aug 2024 11:09:09 -0400 Subject: [PATCH] Services: denormalize Netdata due to build issue --- modules/services/netdata.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/services/netdata.nix b/modules/services/netdata.nix index 87edeb8..4f16ddf 100644 --- a/modules/services/netdata.nix +++ b/modules/services/netdata.nix @@ -53,14 +53,7 @@ in }; config = lib.mkMerge [ - (lib.mkIf cfg.enable { - services.netdata = { - enable = true; - package = pkgs.unstable.netdataCloud; - enableAnalyticsReporting = false; - }; - }) - (lib.mkIf (cfg.type == "parent") { + (lib.mkIf (cfg.enable && cfg.type == "parent") { services = { nginx.virtualHosts."${cfg.url}" = { useACMEHost = cfg.domain; @@ -83,6 +76,9 @@ in }; netdata = { + enable = true; + package = pkgs.unstable.netdataCloud; + enableAnalyticsReporting = false; configDir = { # Enable nvidia-smi: https://nixos.wiki/wiki/Netdata#nvidia-smi "python.d.conf" = pkgs.writeText "python.d.conf" '' @@ -103,8 +99,11 @@ in systemd.services.nginx.wants = [ config.systemd.services.netdata.name ]; }) - (lib.mkIf (cfg.type == "child") { + (lib.mkIf (cfg.enable && cfg.type == "child") { services.netdata = { + enable = true; + package = pkgs.unstable.netdataCloud; + enableAnalyticsReporting = false; # Disable web UI config = { global = {