diff options
| author | Martin Fischer <martin@push-f.com> | 2026-01-24 09:49:01 +0100 |
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2026-01-24 10:00:12 +0100 |
| commit | 9cbeb3d9b3878d57f2c0def4bbe3d928001a69c5 (patch) | |
| tree | bb94753dd7626ed494ffca37825b459454cef446 /nixos/hosts/tente/grafana.nix | |
| parent | fd62f221db9eb59938166147bc923d6059553a5c (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/grafana.nix')
| -rw-r--r-- | nixos/hosts/tente/grafana.nix | 28 |
1 files changed, 11 insertions, 17 deletions
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; - }; }; } |
