From a6736c2ac15e4730deed9f3f2467f3101fefc2d2 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 1 Apr 2026 15:37:43 +0200 Subject: [PATCH 1/2] fix(sgx): treat rsync exit code 24 as success in backup Files vanishing during transfer is expected for mail directories where messages are constantly moved. Co-Authored-By: Claude Opus 4.6 (1M context) --- systems/x86_64-linux/sgx/backup.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/systems/x86_64-linux/sgx/backup.nix b/systems/x86_64-linux/sgx/backup.nix index 1380e40..3338254 100644 --- a/systems/x86_64-linux/sgx/backup.nix +++ b/systems/x86_64-linux/sgx/backup.nix @@ -29,6 +29,10 @@ in ]; backupPrepareCommand = '' HOME=/root ${pkgs.rsync}/bin/rsync -e "${pkgs.openssh}/bin/ssh" --exclude-from /root/excludelist --no-specials --no-devices --numeric-ids --delete-after --partial -axz backup@mx.surfsite.org:/{etc,var,home,root} ${backup_new_path} + rc=$? + # exit code 24 = files vanished during transfer (normal for mail dirs) + if [ $rc -eq 24 ]; then exit 0; fi + exit $rc ''; }; From 60ed46689c92f71da341144ee9a7b1fbd977c673 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 1 Apr 2026 15:37:49 +0200 Subject: [PATCH 2/2] fix: use unescaped %I in ntfy failure notification script %i passes the escaped unit name which systemctl status cannot resolve, causing "Failed to mangle name" errors. Co-Authored-By: Claude Opus 4.6 (1M context) --- modules/nixos/services/systemd-email-notify/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nixos/services/systemd-email-notify/default.nix b/modules/nixos/services/systemd-email-notify/default.nix index 0cdce43..874d0be 100644 --- a/modules/nixos/services/systemd-email-notify/default.nix +++ b/modules/nixos/services/systemd-email-notify/default.nix @@ -117,7 +117,7 @@ in ${cfg.ntfy.url}/${cfg.ntfy.topic} ''; }; - scriptArgs = "%i"; + scriptArgs = "%I"; }; }) ]);