From 51b5f0744db1b8b7bb33c8b6a3b99295ca51ef9d Mon Sep 17 00:00:00 2001 From: notgne2 Date: Fri, 20 Jan 2023 12:10:55 -0700 Subject: [PATCH] Set NixOS boot entry after activation instead of before --- flake.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 9b8e6eb4..417b0f94 100644 --- a/flake.nix +++ b/flake.nix @@ -96,7 +96,10 @@ # work around https://github.com/NixOS/nixpkgs/issues/73404 cd /tmp - $PROFILE/bin/switch-to-configuration switch + # Explicitly test then boot instead of switch (which works the other way round), + # so that a reboot will recover after a failure + $PROFILE/bin/switch-to-configuration test + $PROFILE/bin/switch-to-configuration boot # https://github.com/serokell/deploy-rs/issues/31 ${with base.config.boot.loader;