Edit: from what I understand kernels are read from
/boot, which is part of the main partition if the actual boot partition is mounted to/boot/efi?
Yes
Will garbage collection clean up kernel files from the boot partition? And clean up the old ones in root?
With grub the esp should not contain kernels
Would this be the right order and the right commands to remount the boot partition?
Yes, but you’ll also have to clean up the esp before installing grub, e.g. rm -rf /boot/efi/*
I notice I already have
/boot/EFI. Not sure if that is an issue?
See above
In hardware-configuration.nix I just have to change the
/bootpath to/boot/efi?
Yes
After this just a
nixos-rebuild switchto apply the changes, and reboot to confirm?
Use sudo nixos-rebuild switch --install-bootloader to install new boot loader