diff --git a/modules/installer/tools/nixos-rebuild.sh b/modules/installer/tools/nixos-rebuild.sh index c2210b629394..6fc9014027d9 100644 --- a/modules/installer/tools/nixos-rebuild.sh +++ b/modules/installer/tools/nixos-rebuild.sh @@ -188,6 +188,9 @@ fi # If we're not just building, then make the new configuration the boot # default and/or activate it now. if test "$action" = switch -o "$action" = boot -o "$action" = test; then + # Just in case the new configuration hangs the system, do a sync now. + sync + $pathToConfig/bin/switch-to-configuration "$action" fi