modules/autoupdate: use nix copy to fetch new system from cache

This commit is contained in:
Astro 2022-01-23 01:20:15 +01:00
parent 2a76be8b16
commit 3a521f7673

View File

@ -37,7 +37,7 @@
if [ "$OLD" != "$NEW" ]; then
echo "New system available: $NEW"
# this should fetch the new system from the binary cache
nix build --no-link "$NEW"
nix copy --from https://nix-serve.hq.c3d2.de "$NEW"
if [ -e "$NEW/etc/systemd/system/autoupdate.timer" ]; then
# switch to the new system
"$NEW/bin/switch-to-configuration" switch