modules/autoupdate: always run nix-env before switch-to-configuration
This commit is contained in:
parent
8097c9a521
commit
5c493a8128
|
@ -41,6 +41,7 @@
|
|||
nix copy --from https://hydra.hq.c3d2.de "$NEW"
|
||||
if [ -e "$NEW/etc/systemd/system/autoupdate.timer" ]; then
|
||||
echo "Switch to the new system..."
|
||||
nix-env -p /nix/var/nix/profiles/system --set $NEW
|
||||
"$NEW/bin/switch-to-configuration" switch
|
||||
else
|
||||
echo "New system is not yet autoupdate-enabled. Refusing to switch into a dead end."
|
||||
|
@ -93,6 +94,7 @@
|
|||
# this should fetch the new system from the binary cache
|
||||
nix copy --from https://hydra.hq.c3d2.de "$NEW"
|
||||
echo "Switch to the new system..."
|
||||
nix-env -p /nix/var/nix/profiles/system --set $NEW
|
||||
"$NEW/bin/switch-to-configuration" switch
|
||||
else
|
||||
echo "No update required"
|
||||
|
|
Loading…
Reference in New Issue