I have migrated my configuration.nix to flakes using this guide.
Everything seems to work fine when I do sudo nixos-rebuild switch --flake .
However when I reboot, my system is stuck at the configuration before the migration. /run/booted-system never changes. I can switch again, use the new packages but after reboot the old config is applied.
Thanks
No, the last one in Grub menu is 175. nixos-rebuild list-generations --flake '.' | cat says the current one is 193. I don’t even have 175 listed there.
That sounds like there are more than just one generation of configurations missing. I mean you could try reinstall the bootloader and see if that changes anything.
Thanks again, now for the pointer to the bootloader. Turns out I was doing two things at once and blamed flakes wrongly.
I have two UEFI partitions, because every time I upgrade the BIOS, the tool messes with the UEFI partition, leaving just Windows working. Long story short, the tool activated the other partition . Updating my /boot mount point fixed the issue. (I did not have to use --install-bootloader, but had to run nixos-rebuild twice, probably it first writes to grub.cfg and then remounts the partitions).