I discovered some time ago that running sudo nixos-rebuild switch does not update the entries in /boot/loader/entries. When I boot, I always see the same invariant 66 entries last modified on October of 2020.
The symptoms are very much like this:
But my configuration of the boot partition seems to be correct as far as I can tell, and I haven’t changed the configuration of bootloaders or the mount points ever since.
$ mount | grep boot
/dev/nvme0n1p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
$ grep boot /etc/nixos/configuration.nix
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/nvme0n1";
boot.loader.grub.configurationLimit = 100;
The configuration in /etc/nixos/hardware-configuration.nix looks correct as well
I discovered today that I can boot into the latest generations if I change the firmware to boot in legacy mode. For some reason, nixos stopped updating efi entries and only updates the legacy configuration. I wonder if there is some way to have both configurations updated.