diff --git a/home/services/backup-home.nix b/home/services/backup-home.nix index ef3ca41..f5eb077 100644 --- a/home/services/backup-home.nix +++ b/home/services/backup-home.nix @@ -11,7 +11,6 @@ let retval=$? if [ $retval -ne 0 ]; then echo "Failed to send notification" - exit $retval fi # Do the backup @@ -25,6 +24,12 @@ let if [ $retval -ne 0 ]; then ${pkgs.libnotify}/bin/notify-send -u critical "Backup failed" "Backup of /home/torjus failed" retval=$? + if [ $retval -ne 0 ]; then + # TODO: put token in sops + ${pkgs.curl}/bin/curl "https://gotify.t-juice.club/message?token=ABgV8XT62bxyCzF" \ + -F "title=Backup of home@gunter failed!" \ + -F "message=Please check status of backup-home service" + fi fi # Remove old snapshots and prune