diff options
author | Hugh O'Brien <github@hughobrien.ie> | 2023-08-18 20:02:16 -0400 |
---|---|---|
committer | Hugh O'Brien <github@hughobrien.ie> | 2023-08-18 20:02:16 -0400 |
commit | a08d69ba6322ebb2a2cd3dec4b5b6919f335bc29 (patch) | |
tree | a06e3dd642e78bf7c2738ae8c4bb0a5d0df7b5c0 /nixos/modules/services/backup | |
parent | 18e6e425b05252496623e5828449a54b1d991372 (diff) |
nixos/restic: wait for network-online for timed backups
Diffstat (limited to 'nixos/modules/services/backup')
-rw-r--r-- | nixos/modules/services/backup/restic.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/services/backup/restic.nix b/nixos/modules/services/backup/restic.nix index 1620770e5b564..6f4cbab817267 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}" ]) |