nixos/restic: wait for network-online for timed backups

This commit is contained in:
Hugh O'Brien 2023-08-18 20:02:16 -04:00
parent 18e6e425b0
commit a08d69ba63
No known key found for this signature in database
GPG key ID: C940B792DD697FBE

View file

@ -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}" ])