diff --git a/modules/backup.nix b/modules/backup.nix index 90f2f2d..fbd98dc 100644 --- a/modules/backup.nix +++ b/modules/backup.nix @@ -110,8 +110,15 @@ in title="${hostname}: backup completed with exit code: $exitStatus" msg=$(journalctl -o cat _SYSTEMD_INVOCATION_ID=$invocationId) + if [ "$exitStatus" -eq 0 ]; then + tag="v" + else + tag="rotating_light" + fi + ${pkgs.curl}/bin/curl -sL -u $(cat ${config.sops.secrets."services/ntfy".path}) \ -H "Title: $title" \ + -H "Tags: $tag" \ -d "$msg" \ https://ntfy.cything.io/backups > /dev/null '';