diff options
author | Martin Fischer <martin@push-f.com> | 2025-08-27 21:19:14 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2025-08-28 20:59:59 +0200 |
commit | 647360dd67bacc00b7c280743a4834206aec89f1 (patch) | |
tree | e9f9c64e7bae18f1b0c0b49da9f48e669efe77b1 /nixos/hosts | |
parent | 613346ff97f9c3ac2e9026613aa4b183a06917a2 (diff) |
tente: replace gotify with grafana-matrix-forwarder
Diffstat (limited to 'nixos/hosts')
-rw-r--r-- | nixos/hosts/tente/default.nix | 7 | ||||
-rw-r--r-- | nixos/hosts/tente/gotify.nix | 21 | ||||
-rw-r--r-- | nixos/hosts/tente/monitoring.nix | 15 |
3 files changed, 19 insertions, 24 deletions
diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix index 6063b2c..e63b9bc 100644 --- a/nixos/hosts/tente/default.nix +++ b/nixos/hosts/tente/default.nix @@ -11,7 +11,7 @@ let helpers = import <top/helpers.nix> { inherit config lib pkgs; }; pkgs-unstable = import sources.nixpkgs-unstable {}; in -{ +rec { _module.args = { inherit pkgs-unstable; }; imports = [ ./hardware-configuration.nix @@ -20,7 +20,6 @@ in <top/shared/tailscale.nix> ./web-personal.nix ./git.nix - ./gotify.nix ./headscale.nix ./matrix.nix ./monitoring.nix @@ -118,13 +117,15 @@ in monitoring.grafanaUiPort = 3000; monitoring.alloyUiPort = 3001; + monitoring.grafanaMatrixForwarderPort = 3002; monitoring.lokiPort = 3030; - gotify.port = 4000; monitoring.prometheusNodeExporterPort = 9002; monitoring.prometheusSqlExporterPort = 9003; headscale.port = 8080; matrix.port = 8008; + monitoring.matrixServerUrl = "http://localhost:${toString matrix.port}"; + # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; # boot.loader.grub.efiSupport = true; diff --git a/nixos/hosts/tente/gotify.nix b/nixos/hosts/tente/gotify.nix deleted file mode 100644 index ba0fd02..0000000 --- a/nixos/hosts/tente/gotify.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, lib, ... }: - -let - cfg = config.gotify; -in -{ - options.gotify = { - port = lib.mkOption { - type = lib.types.int; - }; - }; - - config = { - services.gotify = { - enable = true; - environment = { - GOTIFY_SERVER_PORT = cfg.port; - }; - }; - }; -} diff --git a/nixos/hosts/tente/monitoring.nix b/nixos/hosts/tente/monitoring.nix index a999c8a..f6ed7cf 100644 --- a/nixos/hosts/tente/monitoring.nix +++ b/nixos/hosts/tente/monitoring.nix @@ -9,6 +9,9 @@ in grafanaUiPort = lib.mkOption { type = lib.types.int; }; + grafanaMatrixForwarderPort = lib.mkOption { + type = lib.types.int; + }; lokiPort = lib.mkOption { type = lib.types.int; }; @@ -21,13 +24,19 @@ in prometheusSqlExporterPort = lib.mkOption { type = lib.types.int; }; + matrixServerUrl = lib.mkOption { + type = lib.types.str; + }; }; imports = [ <top/shared/prometheus-sql-exporter/service.nix> + <top/shared/grafana-matrix-forwarder/service.nix> ]; config = { + age.secrets.grafana-matrix-forwarder-env.file = <top/secrets/grafana-matrix-forwarder-env.age>; + services.grafana = { enable = true; settings = { @@ -54,6 +63,12 @@ in ]; }; }; + services.grafana-matrix-forwarder = { + enable = true; + port = cfg.grafanaMatrixForwarderPort; + homeserver = cfg.matrixServerUrl; + environmentFile = config.age.secrets.grafana-matrix-forwarder-env.path; + }; services.prometheus = { enable = true; |