Installing bootloader from 21.11 installer hard locks my laptop

I have successfully built a system from a clean install, using nixos-install --no-bootloader.
Almost everything runs smoothly, although the perl script for migrating users fails? (complains?) because <=> is not defined.

Following instructions found at Bootloader - NixOS Wiki, I then ran (with dev proc and sys mounted from the installer system):

    /nix/var/nix/profiles/system/bin/switch-to-configuration boot

My laptop is now totally locked.

Why did I do the bootloader and install in two parts? Because the installation of 21.11 kept failing, and I realised the issue might be with the bootloader part rather than nixos itself.

Relevant configuration.nix:

boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.luks.devices = {
    root = {
    device = "/dev/nvme0n1p2";
    preLVM = true;

How can I get the bootloader installed?

I fixed it by changing canTouchEfiVariables to false.
My system now builds & boots, but I don’t know what the implications of this fix are.