From 91dfaa5453fca2a12f375d25b084f82d1a370491 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 11 Jan 2022 13:43:07 +0100 Subject: nixos/borgbackup: start remote backup only if network is available --- nixos/modules/services/backup/borgbackup.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/backup/borgbackup.nix b/nixos/modules/services/backup/borgbackup.nix index cb2c4d6381f..05f222d5fbe 100644 --- a/nixos/modules/services/backup/borgbackup.nix +++ b/nixos/modules/services/backup/borgbackup.nix @@ -108,6 +108,8 @@ let timerConfig = { Persistent = cfg.persistentTimer; }; + # if remote-backup wait for network + after = optional (cfg.persistentTimer && !isLocalPath cfg.repo) "network-online.target"; }; # utility function around makeWrapper -- cgit 1.4.1