fix networking online target + ntfy notifications
All checks were successful
Check Flake / check-flake (push) Successful in 3m36s

This commit is contained in:
2026-02-25 23:24:23 -08:00
parent 1ac3f05e3e
commit f4a4edf478
3 changed files with 28 additions and 0 deletions

View File

@@ -16,6 +16,12 @@ in
default = "service-failures";
description = "ntfy topic to publish alerts to.";
};
curlExtraArgs = lib.mkOption {
type = lib.types.str;
default = "";
description = "Extra arguments to pass to curl (e.g. --proxy http://host:port).";
};
};
config = lib.mkIf config.thisMachine.hasRole."ntfy" {
@@ -33,6 +39,7 @@ in
${lib.getExe pkgs.curl} \
--fail --silent --show-error \
--max-time 30 --retry 3 \
${cfg.curlExtraArgs} \
-H "Authorization: Bearer $NTFY_TOKEN" \
-H "Title: Service failure on ${config.networking.hostName}" \
-H "Priority: high" \