diff options
author | sefidel <contact@sefidel.net> | 2023-08-16 23:22:05 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2023-08-16 23:22:05 +0900 |
commit | 22ea90ebf57e3dc784cae96a7f6bcf073b1aafe7 (patch) | |
tree | 5e7e63f6a6af9a5f73b24a102c802c43384c0ace /nixos | |
parent | efdb84113dd882084d9164b185781d32e7d7745e (diff) | |
download | nixrc-22ea90ebf57e3dc784cae96a7f6bcf073b1aafe7.tar.gz nixrc-22ea90ebf57e3dc784cae96a7f6bcf073b1aafe7.zip |
feat(nixos/alpha): prevent backups from failing on resume
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/alpha/configuration.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/alpha/configuration.nix b/nixos/alpha/configuration.nix index d018e47..ca69a37 100644 --- a/nixos/alpha/configuration.nix +++ b/nixos/alpha/configuration.nix @@ -137,6 +137,14 @@ compression = "auto,zstd"; startAt = "*-*-* 03:00:00"; persistentTimer = true; + inhibitsSleep = true; + }; + + systemd.services."borgbackup-job-alpha-rolling" = { + preStart = lib.mkBefore '' + # Wait until internet is reachable after resuming + until /run/wrappers/bin/ping rsync.net -c1 -q >/dev/null; do :; done + ''; }; services.openssh.knownHosts."hk-s020.rsync.net".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILcPl9x9JfRFwsn09NnDw/xBZbAN80ZQck+h6AqlVqPH"; |