From b80fc49dee26adf786c693a212fae7a65fbe6ade Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Sun, 1 Mar 2026 14:33:03 +0100 Subject: [PATCH] vps-monitor: Disable gatus notifications --- hosts/vps-monitor/default.nix | 13 +------------ modules/nixos/web-services/gatus.nix | 13 ++++++++----- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/hosts/vps-monitor/default.nix b/hosts/vps-monitor/default.nix index d45cc23..e45880b 100644 --- a/hosts/vps-monitor/default.nix +++ b/hosts/vps-monitor/default.nix @@ -32,18 +32,7 @@ enable = true; domain = "status.${privateDomain}"; generateDefaultEndpoints = true; - endpoints = { - "dav.${sproutedDomain}".enable = false; - "alerts.${sproutedDomain}" = { - path = "/v1/health"; - extraConditions = [ "[BODY].healthy == true" ]; - }; - }; - }; - - ntfy = { - enable = true; - domain = "alerts.${sproutedDomain}"; + endpoints."dav.${sproutedDomain}".enable = false; }; }; }; diff --git a/modules/nixos/web-services/gatus.nix b/modules/nixos/web-services/gatus.nix index c47da79..1582efe 100644 --- a/modules/nixos/web-services/gatus.nix +++ b/modules/nixos/web-services/gatus.nix @@ -19,9 +19,12 @@ in type = lib.types.port; default = 8080; }; - ntfyUrl = lib.mkOption { - type = lib.types.nonEmptyStr; - default = "https://${config.custom.web-services.ntfy.domain}"; + alerts = { + enable = lib.mkEnableOption ""; + ntfyUrl = lib.mkOption { + type = lib.types.nonEmptyStr; + default = "https://${config.custom.web-services.ntfy.domain}"; + }; }; generateDefaultEndpoints = lib.mkEnableOption ""; endpoints = lib.mkOption { @@ -62,7 +65,7 @@ in default = [ ]; }; enableAlerts = lib.mkEnableOption "" // { - default = true; + default = cfg.alerts.enable; }; }; } @@ -112,7 +115,7 @@ in path = "${dataDir}/data.db"; }; connectivity.checker.target = "1.1.1.1:53"; # Cloudflare DNS - alerting.ntfy = { + alerting.ntfy = lib.mkIf cfg.alerts.enable { topic = "uptime"; url = cfg.ntfyUrl; click = "https://${cfg.domain}";