nixos-rebuild switch --show-trace
building the system configuration...
updating GRUB 2 menu...
cannot copy /nix/store/9pwq0j9q4frd0808xvw56r8xj20bnxps-initrd-linux-5.6.18/initrd to /boot/kernels/9pwq0j9q4frd0808xvw56r8xj20bnxps-
warning: error(s) occurred while switching to the new configuration
looks like it is locked?
ok, there is an error but what is the error?
That is the error. Is your
/boot partition out of space or something like that?
How to let nixos clean up the boot partition?
do you run periodically
sudo nix-collect-garbage -d or in other ways remove old nixos generations? If you do, then
nixos-rebuild will clenaup EFI boot partition automatically.
It might be that this time you should clean a bit of it manually, but usually it should work automatically.
Alternatively, enlarge boot filesystem.
not any more if it is once filled up
well so I had to manually clean it up.