From d299ac51b404a25cba4a3ade810714137530d40b Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Wed, 15 Oct 2025 12:21:02 -0400 Subject: timer backup --- modules/git/timer-backup.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/git/timer-backup.nix b/modules/git/timer-backup.nix index 42c227d..db19a45 100644 --- a/modules/git/timer-backup.nix +++ b/modules/git/timer-backup.nix @@ -14,8 +14,10 @@ script = '' mkdir -p $HOME/backups - REPOSITORIES=$(find /home/git/* -name '*.git' -type d) + REPOSITORIES=!(backups) + tar cf $HOME/backups/repositories-$(date +%s).tar $REPOSITORIES + find $HOME/backups -mtime 5 -delete ''; serviceConfig = { -- cgit v1.2.3