···335 available_match = re.search(r"^\((.*)\)$", available_out)
336337 if installed_match is None:
338- raise Exception("could not find any previously installed systemd-boot")
339340 if available_match is None:
341 raise Exception("could not determine systemd-boot version")
···335 available_match = re.search(r"^\((.*)\)$", available_out)
336337 if installed_match is None:
338+ raise Exception("Could not find any previously installed systemd-boot. If you are switching to systemd-boot from a different bootloader, you need to run `nixos-rebuild switch --install-bootloader`")
339340 if available_match is None:
341 raise Exception("could not determine systemd-boot version")