From 993c40225ee4572bd537ee1e6022280e5c4f0de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Wed, 6 Mar 2024 15:16:40 +0100 Subject: [PATCH] Fix backup-home service --- home/services/backup-home.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/home/services/backup-home.nix b/home/services/backup-home.nix index 10aef5a..ef3ca41 100644 --- a/home/services/backup-home.nix +++ b/home/services/backup-home.nix @@ -11,7 +11,7 @@ let retval=$? if [ $retval -ne 0 ]; then echo "Failed to send notification" - exit 1 + exit $retval fi # Do the backup @@ -19,11 +19,12 @@ let ${pkgs.restic}/bin/restic backup /home/torjus \ --exclude '/home/torjus/.cache' \ --exclude '/home/torjus/.local/share/Steam' \ + --exclude '/home/torjus/.local/share/containers' \ --exclude '/home/torjus/git/nixpkgs' retval=$? if [ $retval -ne 0 ]; then ${pkgs.libnotify}/bin/notify-send -u critical "Backup failed" "Backup of /home/torjus failed" - exit 1 + retval=$? fi # Remove old snapshots and prune @@ -48,7 +49,7 @@ let retval=$? if [ $retval -ne 0 ]; then echo "Failed to send notification" - exit 1 + exit $retval fi ''; in