HOWTO: Unlock LUKS encrypted disks over SSH on a Raspberry Pi 4 running NixOS

Follow the instructions on the NixOS wiki . For a Raspberry Pi 4 connected over Ethernet, you need: boot . initrd . availableKernelModules = [ "xhci_pci" "usbhid" "uas" "pcie-brcmstb" "reset-raspberrypi" "genet" "broadcom" "bcm_phy_lib" ] ; Also note: use cipher xchacha20,aes-adiantum-plain64 on Raspberry Pi 4 due to the lack of AES hardware instructions. The default aes-xts-plain64 is slow…