Merge pull request #249726 from hughobrien/restic-service-network-target

nixos/restic: wait for network-online for timed backups
This commit is contained in:
Nick Cao 2023-08-27 13:06:19 +08:00 committed by GitHub
commit 3b5bb2461c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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