Even though there are no errors when running such a command, that doesn’t work, unfortunately, because it doesn’t set the necessary EFI variables.
There’s a much simpler solution:
- Boot a live ISO
- Mount the ESP to say,
/boot
- Run
bootctl --path=/boot install
- Reorder the entries using
efibootmgr
to put the NixOS-managed bootloader up firstCurrently this last step doesn’t work, because the version of(EDIT: PR’s merged now.)efibootmgr
in nixpkgs is broken, however, this should be fixed if the relevant PR is merged