Prevent nify-failure from calling itself
Some checks failed
Check Flake / check-flake (push) Failing after 4m13s

This commit is contained in:
2026-03-03 22:34:04 -08:00
parent bb39587292
commit e32834ff7f

View File

@@ -14,6 +14,8 @@ in
EnvironmentFile = "/run/agenix/ntfy-token";
ExecStart = "${pkgs.writeShellScript "ntfy-failure-notify" ''
unit="$1"
# Prevent infinite recursion if this service itself fails
[[ "$unit" == ntfy-failure@* ]] && exit 0
ignored_units=(${lib.concatMapStringsSep " " (u: lib.escapeShellArg u) cfg.ignoredUnits})
for ignored in "''${ignored_units[@]}"; do
if [[ "$unit" == "$ignored" ]]; then