AutoUpdateSigned : Replace broken RuntimeMaxSec with timeout, thanks to Fox.

This commit is contained in:
Dmitry Voronin 2024-10-14 16:54:04 +03:00
parent 8047d13b59
commit c3c40ed6f6
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -34,11 +34,12 @@ in
enable = true; enable = true;
description = "Signed system auto-update."; description = "Signed system auto-update.";
serviceConfig = { serviceConfig = {
RuntimeMaxSec = "55m"; # RuntimeMaxSec = "55m"; # Doesn't work with oneshot, using timeout bellow.
Type = "oneshot"; Type = "oneshot";
}; };
path = with pkgs; [ path = with pkgs; [
bash bash
coreutils
git git
gnumake gnumake
nixos-rebuild nixos-rebuild
@ -53,7 +54,7 @@ in
echo "Verification failed." echo "Verification failed."
exit 1 exit 1
}; };
make switch timeout 55m make switch
''; '';
after = [ "network-online.target" ]; after = [ "network-online.target" ];
wants = [ "network-online.target" ]; wants = [ "network-online.target" ];