backup: don't send ntfy notification

This commit is contained in:
cy 2025-02-25 15:48:18 -05:00
parent d76a9f7f3a
commit 1cadfda410
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts
3 changed files with 0 additions and 24 deletions

View file

@ -31,9 +31,6 @@
"borg/rsyncnet" = {
sopsFile = ../../secrets/borg/chunk.yaml;
};
"services/ntfy" = {
sopsFile = ../../secrets/services/ntfy.yaml;
};
"rclone/config" = {
sopsFile = ../../secrets/rclone.yaml;
};

View file

@ -17,9 +17,6 @@
"borg/rsyncnet" = {
sopsFile = ../../secrets/borg/yt.yaml;
};
"services/ntfy" = {
sopsFile = ../../secrets/services/ntfy.yaml;
};
"rsyncnet/id_ed25519" = {
sopsFile = ../../secrets/zh5061/yt.yaml;
};

View file

@ -6,7 +6,6 @@
}:
let
cfg = config.my.backup;
hostname = config.networking.hostName;
defaultPaths = [
"/root"
"/home"
@ -97,23 +96,6 @@ in
];
# warnings are often not that serious
failOnWarnings = false;
postHook = ''
invocationId=$(systemctl show -p InvocationID --value borgbackup-job-${cfg.jobName}.service)
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
'';
prune.keep = {
within = "2d";