From 5c493a8128c097ab2a80708176847f7485eb949d Mon Sep 17 00:00:00 2001 From: Astro Date: Fri, 2 Sep 2022 21:26:14 +0200 Subject: [PATCH] modules/autoupdate: always run nix-env before switch-to-configuration --- modules/autoupdate.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/autoupdate.nix b/modules/autoupdate.nix index 6defec1d..b8cf6125 100644 --- a/modules/autoupdate.nix +++ b/modules/autoupdate.nix @@ -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"