summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2025-10-24 23:48:17 +0200
committerquentin@aristote.fr <quentin@aristote.fr>2025-10-24 23:48:56 +0200
commit912a0443e11f498ce2769f267a086fa20eaee780 (patch)
treed1780d27eaec3c45cf6f2f10c202a019a8e79ec3 /config
parentef4370dab21c97da96da5f0acef7a736e55fcf7c (diff)
storage: borg: check connection to ds411 first
Diffstat (limited to 'config')
-rw-r--r--config/storage.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/config/storage.nix b/config/storage.nix
index 2ebb78a..433e88e 100644
--- a/config/storage.nix
+++ b/config/storage.nix
@@ -1,4 +1,4 @@
-{ ... }:
+{ pkgs, ... }:
{
boot.supportedFilesystems = [ "nfs" ];
fileSystems."/backups" = {
@@ -26,5 +26,14 @@
startAt = "daily";
prune.keep.daily = 7;
};
- systemd.services.borgbackup-job-srv.personal.monitor = true;
+ systemd.services.borgbackup-job-srv = {
+ personal.monitor = true;
+ # Check network connectivity
+ path = [ pkgs.unixtools.ping ];
+ preStart = "ping -c 1 ds411.aristote.mesh || kill -s SIGUSR1 $$";
+ unitConfig = {
+ StartLimitIntervalSec = 300;
+ StartLimitBurst = 5;
+ };
+ };
}