summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixos/modules/services/monitoring/prometheus/unifi-exporter.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/unifi-exporter.nix b/nixos/modules/services/monitoring/prometheus/unifi-exporter.nix
index e3059e48509..0a56d6ae95a 100644
--- a/nixos/modules/services/monitoring/prometheus/unifi-exporter.nix
+++ b/nixos/modules/services/monitoring/prometheus/unifi-exporter.nix
@@ -83,6 +83,7 @@ in {
       description = "Prometheus exporter for UniFi Controller metrics";
       unitConfig.Documentation = "https://github.com/mdlayher/unifi_exporter";
       wantedBy = [ "multi-user.target" ];
+      after = optional config.services.unifi.enable "unifi.service";
       serviceConfig = {
         User = "nobody";
         Restart = "always";