forked from c3d2/nix-config
lib/autoupdate: cap running time with TimeoutStartSec
This commit is contained in:
parent
5e8a1fa12f
commit
ac7b628e8c
|
@ -20,7 +20,12 @@
|
|||
systemd.services.autoupdate = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = with pkgs; [ nixFlakes nettools curl jq ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
# switch-to-configuration may not return. HACK: cap running
|
||||
# time so that the timer can be scheduled again.
|
||||
TimeoutStartSec = "30min";
|
||||
};
|
||||
script = ''
|
||||
OLD=$(readlink /run/current-system)
|
||||
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/x86_64-linux.$(hostname)/latest | jq -r .buildoutputs.out.path)
|
||||
|
|
Loading…
Reference in New Issue
Block a user