diff --git a/nixos/hosts/varda/resources/prune-backups.sh b/nixos/hosts/varda/resources/prune-backups.sh index 8ac70fe..5f1fe48 100644 --- a/nixos/hosts/varda/resources/prune-backups.sh +++ b/nixos/hosts/varda/resources/prune-backups.sh @@ -1,8 +1,8 @@ # Set the backup directory -BACKUP_DIR="/var/lib/forgejo/dump" +BACKUP_DIR="/mnt/storage/forgejo/backups" # Keep the 3 most recent backups -KEEP_NUM=3 +KEEP_NUM=7 echo "Starting backup cleanup process..." echo "Keeping the $KEEP_NUM most recent backups in $BACKUP_DIR" diff --git a/nixos/modules/nixos/services/forgejo/default.nix b/nixos/modules/nixos/services/forgejo/default.nix index 8f5d650..a766ecc 100644 --- a/nixos/modules/nixos/services/forgejo/default.nix +++ b/nixos/modules/nixos/services/forgejo/default.nix @@ -31,7 +31,10 @@ in enable = true; package = cfg.package; # enable sql db dumps daily - dump.enable = true; + dump = { + enable = true; + backupDir = "/mnt/backup/forgejo/backups/"; + }; database.type = "postgres"; # Enable support for Git Large File Storage lfs.enable = true;