From bf81c73ecae0af223286cb1de494c47835b0a611 Mon Sep 17 00:00:00 2001 From: min Date: Thu, 12 Mar 2026 01:12:12 -0400 Subject: [PATCH] Fix node exporter failing to start --- nixos/hosts/eidola/prometheus.nix | 5 +++++ nixos/modules/nebula/shared.nix | 1 + 2 files changed, 6 insertions(+) diff --git a/nixos/hosts/eidola/prometheus.nix b/nixos/hosts/eidola/prometheus.nix index 041482e..f53ce6c 100644 --- a/nixos/hosts/eidola/prometheus.nix +++ b/nixos/hosts/eidola/prometheus.nix @@ -1,5 +1,6 @@ _: let ipInternal = "10.13.1.1"; # TODO: hardcoding + inherit (import ../../modules/nebula/shared.nix) unit; in { services.prometheus.exporters = { node = { @@ -8,4 +9,8 @@ in { enabledCollectors = ["systemd"]; }; }; + systemd.services."prometheus-node-exporter" = { + wants = [unit]; + after = [unit]; + }; } diff --git a/nixos/modules/nebula/shared.nix b/nixos/modules/nebula/shared.nix index aed7980..a839a4a 100644 --- a/nixos/modules/nebula/shared.nix +++ b/nixos/modules/nebula/shared.nix @@ -4,4 +4,5 @@ rec { # https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/services/networking/nebula.nix interface = "nebula.${netName}"; userGroup = "nebula-${netName}"; + unit = "nebula@${netName}.service"; }