about summary refs log tree commit diff
path: root/modules/alertmanager.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-05-02 14:30:08 +0300
committerAzat Bahawi <azat@bahawi.net>2024-05-02 14:30:08 +0300
commit3c61dc9cc35ed201877d81b1b7ad848f1ac9855e (patch)
treecd9c766d3046cbaddfdd48ef34d6229e37d36591 /modules/alertmanager.nix
parent2024-05-02 (diff)
2024-05-02
Diffstat (limited to '')
-rw-r--r--modules/alertmanager.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/alertmanager.nix b/modules/alertmanager.nix
index a3457bc..022f631 100644
--- a/modules/alertmanager.nix
+++ b/modules/alertmanager.nix
@@ -3,6 +3,8 @@
   inputs,
   lib,
   libNginx,
+  pkgs,
+  this,
   ...
 }:
 with lib;
@@ -84,5 +86,17 @@ in
       ntfyPriority = "high";
       envFile = "/dev/null";
     };
+
+    topology = with cfg; {
+      nodes.${this.hostname}.services.alertmanager = {
+        name = "Alertmanager";
+        icon = pkgs.fetchurl {
+          url = "https://www.svgrepo.com/download/354219/prometheus.svg";
+          sha256 = "sha256-4n3v95vfHYz65Hh/8BeRf4T++EGdOLKHuwVuusYt9dc=";
+        };
+        info = domain;
+        details.listen.text = "127.0.0.1:${toString port}";
+      };
+    };
   };
 }

Consider giving Nix/NixOS a try! <3