Merge pull request #249726 from hughobrien/restic-service-network-target
nixos/restic: wait for network-online for timed backups
This commit is contained in:
commit
3b5bb2461c
|
@ -333,6 +333,8 @@ in
|
||||||
backup.rcloneConfig);
|
backup.rcloneConfig);
|
||||||
path = [ pkgs.openssh ];
|
path = [ pkgs.openssh ];
|
||||||
restartIfChanged = false;
|
restartIfChanged = false;
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
after = [ "network-online.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = (optionals (backupPaths != "") [ "${resticCmd} backup ${concatStringsSep " " (backup.extraBackupArgs ++ excludeFlags)} ${backupPaths}" ])
|
ExecStart = (optionals (backupPaths != "") [ "${resticCmd} backup ${concatStringsSep " " (backup.extraBackupArgs ++ excludeFlags)} ${backupPaths}" ])
|
||||||
|
|
Loading…
Reference in a new issue