fix(borg): ensure we're online before running backups
This commit is contained in:
parent
0ed6fbaa63
commit
876de6ca1d
1 changed files with 18 additions and 0 deletions
|
@ -23,4 +23,22 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
borgbackup-backup-job = {
|
||||
after = ["ensure-online.service"];
|
||||
requires = ["ensure-online.service"];
|
||||
};
|
||||
|
||||
ensure-online = {
|
||||
description = "waiting for Network";
|
||||
after = ["network-online.target"];
|
||||
requires = ["network-online.target"];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.networkmanager}/bin/nm-online -q --timeout=300";
|
||||
Type = "oneshot";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue