When installing NixOS I created a separate partition for my data and one for the OS. They were both LUKS encrypted, same file system. After that I realized I wanted to combine them so I used Gparted using the installation media. After I restarted my computer, upon giving the encryption password, the bootloader is trying to decrypt the partition I have combined and it gets stuck saying it can’t find it.
How can I edit the bootloader so I remove the old reference to the partition that’s no longer there?
Here is how my drives are setup and which one I combined:
This is not an issue of the bootloader, this is an issue of the initrd configuration which is managed by NixOS and cannot trivially be modified before a successful boot.
I see two ways forward for you:
Reboot into a recovery environment (i.e. NixOS ISO) and chroot into your NixOS installation using nixos-enter
Create a new stub LUKS volume that has the same identifier as the old one and boot normally
From this point, you need to modify your config to no longer reference the old LUKS drive and rebuild. If you chose 2., you can now delete the LUKS volume stub.