rpi3b/4

rpi4 #

https://nix.dev/tutorials/nixos/installing-nixos-on-a-raspberry-pi

Download the image: https://hydra.nixos.org/job/nixos/trunk-combined/nixos.sd_image.aarch64-linux

It’s a .zst compressed file. Uncompress by unzstd filename.img.zst to get a .img file.

Copy it to the SD card:

sudo dd if=nixos-sd-image-23.11pre500597.0fbe93c5a7c-aarch64-linux.img of=/dev/sdX bs=4096 conv=fsync status=progress

Internet: wpa_supplicant -B -i wlan0 -c <(wpa_passphrase 'SSID' 'passphrase') &

Update firmware:

nix-shell -p raspberrypi-eeprom
mount /dev/disk/by-label/FIRMWARE /mnt
BOOTFS=/mnt FIRMWARE_RELEASE_STATUS=stable rpi-eeprom-update -d -a

Switch: nixos-rebuild boot --verbose, then reboot