"No bootable device" after some time

Hello, I’m new to Nix and NixOS.

I have been using NixOS for a relatively long time, but I had to leave my laptop for about three days, and now I get the error “no bootable device”. I tried using my USB flash drive with NixOS. Still, thanks to the rEFInd utility, I was able to boot into my system, but I still don’t understand what the problem is. I can attach configuration files if necessary.

P.S.
I’m not completely sure if the problem is in NixOS or in my hardware

Your mobo may have lost the boot entry. Run nixos-rebuild with the --install-bootloader flag.