about summary refs log tree commit diff
path: root/nixos/modules/services/backup
diff options
context:
space:
mode:
authorHugh O'Brien <github@hughobrien.ie>2023-08-18 20:02:16 -0400
committerHugh O'Brien <github@hughobrien.ie>2023-08-18 20:02:16 -0400
commita08d69ba6322ebb2a2cd3dec4b5b6919f335bc29 (patch)
treea06e3dd642e78bf7c2738ae8c4bb0a5d0df7b5c0 /nixos/modules/services/backup
parent18e6e425b05252496623e5828449a54b1d991372 (diff)
downloadnixlib-a08d69ba6322ebb2a2cd3dec4b5b6919f335bc29.tar
nixlib-a08d69ba6322ebb2a2cd3dec4b5b6919f335bc29.tar.gz
nixlib-a08d69ba6322ebb2a2cd3dec4b5b6919f335bc29.tar.bz2
nixlib-a08d69ba6322ebb2a2cd3dec4b5b6919f335bc29.tar.lz
nixlib-a08d69ba6322ebb2a2cd3dec4b5b6919f335bc29.tar.xz
nixlib-a08d69ba6322ebb2a2cd3dec4b5b6919f335bc29.tar.zst
nixlib-a08d69ba6322ebb2a2cd3dec4b5b6919f335bc29.zip
nixos/restic: wait for network-online for timed backups
Diffstat (limited to 'nixos/modules/services/backup')
-rw-r--r--nixos/modules/services/backup/restic.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/services/backup/restic.nix b/nixos/modules/services/backup/restic.nix
index 1620770e5b56..6f4cbab81726 100644
--- a/nixos/modules/services/backup/restic.nix
+++ b/nixos/modules/services/backup/restic.nix
@@ -333,6 +333,8 @@ in
               backup.rcloneConfig);
             path = [ pkgs.openssh ];
             restartIfChanged = false;
+            wants = [ "network-online.target" ];
+            after = [ "network-online.target" ];
             serviceConfig = {
               Type = "oneshot";
               ExecStart = (optionals (backupPaths != "") [ "${resticCmd} backup ${concatStringsSep " " (backup.extraBackupArgs ++ excludeFlags)} ${backupPaths}" ])