nix-config/nixos
jasmine a276fdf53a
fix(borgbackup): prevent race conditions and improve reliability
Fixes multiple issues with borgbackup service coordination:

1. Race condition between onsite/offsite backups
   - Set Type=oneshot to ensure services wait for completion
   - Added Wants= dependency to trigger onsite when offsite runs
   - Prevents snapshot path collision at /btrfs-subvolumes

2. Network unavailability after sleep/wake
   - Added persistentTimer=true to onsite backups
   - NixOS module now auto-adds network-online.target dependencies
   - Fixes DNS resolution failures for SSH repos

3. Data loss risk from missed backups
   - Persistent timers ensure backups run on wake if missed
   - Protects work done before sleep from being unbackored

4. Duplicate onsite runs at midnight
   - Removed 15-minute stagger (00:15 -> 00:00)
   - Systemd deduplicates services in same transaction
   - Onsite now runs once, not twice

Applied to both fuchsia and viridian for consistency.
2025-10-09 11:30:00 +08:00
..
common fix(ssh): enable key-based root login and use FQDNs for system services 2025-10-07 23:11:31 +08:00
fuchsia fix(borgbackup): prevent race conditions and improve reliability 2025-10-09 11:30:00 +08:00
viridian fix(borgbackup): prevent race conditions and improve reliability 2025-10-09 11:30:00 +08:00