aboutsummaryrefslogtreecommitdiff
path: root/nixos/hosts/tente
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2026-01-24 09:49:01 +0100
committerMartin Fischer <martin@push-f.com>2026-01-24 10:00:12 +0100
commit9cbeb3d9b3878d57f2c0def4bbe3d928001a69c5 (patch)
treebb94753dd7626ed494ffca37825b459454cef446 /nixos/hosts/tente
parentfd62f221db9eb59938166147bc923d6059553a5c (diff)
tweak(tente): send Grafana alerts via email instead of Matrix
Less moving parts. Instead of: Grafana -> Forwarder -> Conduit -> UnifiedPush? -> Matrix client just Grafana -> Mail server -> Mail client
Diffstat (limited to 'nixos/hosts/tente')
-rw-r--r--nixos/hosts/tente/default.nix2
-rw-r--r--nixos/hosts/tente/grafana.nix28
-rw-r--r--nixos/hosts/tente/secrets/alerts-smtp.age7
-rw-r--r--nixos/hosts/tente/secrets/grafana-matrix-forwarder-env.agebin449 -> 0 bytes
4 files changed, 18 insertions, 19 deletions
diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix
index 8297fc9..2dcfe62 100644
--- a/nixos/hosts/tente/default.nix
+++ b/nixos/hosts/tente/default.nix
@@ -102,8 +102,6 @@ in
grafana = {
port = ports.grafana;
- matrixForwarderPort = ports.grafanaMatrixForwarder;
- matrixServerUrl = "http://localhost:${toString ports.matrix}";
};
headscale = {
diff --git a/nixos/hosts/tente/grafana.nix b/nixos/hosts/tente/grafana.nix
index 73ea0d3..f6db5ca 100644
--- a/nixos/hosts/tente/grafana.nix
+++ b/nixos/hosts/tente/grafana.nix
@@ -9,20 +9,13 @@ in
port = lib.mkOption {
type = lib.types.int;
};
- matrixForwarderPort = lib.mkOption {
- type = lib.types.int;
- };
- matrixServerUrl = lib.mkOption {
- type = lib.types.str;
- };
};
- imports = [
- <top/shared/grafana-matrix-forwarder/service.nix>
- ];
-
config = {
- age.secrets.grafana-matrix-forwarder-env.file = ./secrets/grafana-matrix-forwarder-env.age;
+ age.secrets.alerts-smtp = {
+ file = ./secrets/alerts-smtp.age;
+ owner = "grafana";
+ };
services.grafana = {
enable = true;
@@ -31,6 +24,13 @@ in
http_addr = "0.0.0.0";
http_port = cfg.port;
};
+ smtp = rec {
+ enabled = true;
+ host = "smtp.migadu.com:465";
+ user = "alerts@push-f.com";
+ from_address = user;
+ password = "$__file{${config.age.secrets.alerts-smtp.path}}";
+ };
};
provision = {
@@ -61,11 +61,5 @@ in
];
};
};
- services.grafana-matrix-forwarder = {
- enable = true;
- port = cfg.matrixForwarderPort;
- homeserver = cfg.matrixServerUrl;
- environmentFile = config.age.secrets.grafana-matrix-forwarder-env.path;
- };
};
}
diff --git a/nixos/hosts/tente/secrets/alerts-smtp.age b/nixos/hosts/tente/secrets/alerts-smtp.age
new file mode 100644
index 0000000..d673690
--- /dev/null
+++ b/nixos/hosts/tente/secrets/alerts-smtp.age
@@ -0,0 +1,7 @@
+age-encryption.org/v1
+-> ssh-ed25519 aqtcmw knuL8pL0ot3fE042Apaw2CVQ19E8poqNsSznVcqAtSg
+Dp6+7IShnd8MZrSYjh0LqGH7HUc3Tji/76dQCVIwzMA
+-> ssh-ed25519 PMTW+A nvriZ1urwJLuEpCbiZxrKu4juhASLSAQFBA9h4pLzxQ
+zqYNxGJLyl6TU0doc3+BLLvek09cgZ1NS4cO+mx7BPo
+--- 8T5MKNAsvZMtgfIAL3OIKnXeBA3uJkqvQ9SPYwg9p2A
+\Ä MKxª–l>µ¥s­œ™DÿÒ”9;‰}#’øL<G+ŠR|‚2ÿe‚"2¸TO½µ§ \ No newline at end of file
diff --git a/nixos/hosts/tente/secrets/grafana-matrix-forwarder-env.age b/nixos/hosts/tente/secrets/grafana-matrix-forwarder-env.age
deleted file mode 100644
index 84cab14..0000000
--- a/nixos/hosts/tente/secrets/grafana-matrix-forwarder-env.age
+++ /dev/null
Binary files differ