From 5eb05b49e15d6238d50d8e2ed3255dff2a0603f8 Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 10 Jan 2022 15:42:05 +0100 Subject: [PATCH] lib/autoupdate: fix preventive measures --- lib/autoupdate.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/autoupdate.nix b/lib/autoupdate.nix index 5c518270..18679fe0 100644 --- a/lib/autoupdate.nix +++ b/lib/autoupdate.nix @@ -16,7 +16,6 @@ # autoupdate-enabled. it is checked to prevent autoupdating back # to a system without autoupdate when deploying with autoupdate # for the first time. - environment.etc."autoupdated".text = ""; systemd.services.autoupdate = { wantedBy = [ "multi-user.target" ]; @@ -34,11 +33,11 @@ echo "New system available: $NEW" # this should fetch the new system from the binary cache nix build --no-link "$NEW" - if [ -e "$NEW/sw/etc/autoupdated" ]; then + if [ -e "$NEW/etc/systemd/system/autoupdate.timer" ]; then # switch to the new system "$NEW/bin/switch-to-configuration" switch else - echo "New system is not yet autoupdated" + echo "New system is not yet autoupdate-enabled. Refusing to switch into a dead end." fi else echo "No update required"