modules/autoupdate: fix system

This commit is contained in:
Astro 2022-02-08 19:33:35 +01:00
parent 18b68306d0
commit 39c7a9bf1f
1 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@
};
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)
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/${pkgs.system}.$(hostname)/latest | jq -r .buildoutputs.out.path)
if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then
echo "Unable to obtain updated system"
exit 1
@ -67,7 +67,7 @@
OLD=$(readlink /run/current-system)
echo Current system: $(basename $OLD)
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/x86_64-linux.$(hostname)/latest | ${pkgs.jq}/bin/jq -r .buildoutputs.out.path)
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/${pkgs.system}.$(hostname)/latest | ${pkgs.jq}/bin/jq -r .buildoutputs.out.path)
if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then
echo "Unable to obtain updated system"
exit 1