Fresh install of Nixos freezes after selecting generation in grub

I’m trying to install Nixos on an HP Elitebook. I made an encrypted root as per Full Disk Encryption - NixOS Wiki and successfully ran nixos-install. After rebooting, the computer shows Grub and prompts to select Nixos generation. When I select the default, the screen blacks out except for Nixos logo in the top left and then freezes. How to troubleshoot this?

Edit. I noticed that writing the encrypted partition’s password and pressing enter works. It seems to be prompting for the password but not showing it on screen. What to do?