Sure. I’m using the PFT firmware firmware and running my Pi off an SSD. Before I did the installation, I went into the firmware and disabled the 3GB limit and set it to devicetree (for CPU governor support). I put the aarch64 ISO image on a USB stick and the firmware on a FAT-formatted SD card.
For the installation itself, I booted off the USB stick and created the partitions on the SSD. The EEPROM is new enough to support USB booting, so I created the partitions using sgdisk
(the funky order is just because I didn’t want the EPS as partition 1 for some reason at the time):
DISK=<target disk>
sgdisk -Z $DISK -n 3:2048:+384M -n 2:0:+2048M -n 1:0:0 -t 3:ef00 -t 2:8200 -t 1:8300
mkfs -t vfat -F 32 -n ESP $DISK-part3
mkfs -t xfs -L NixOS $DISK-part1
mkswap -L Swap $DISK-part2 && swapon $DISK-part2
I mounted $DISK-part1
at /mnt
and $DISK-part3
at /boot/efi
then ran nixos-generate-config --root /mnt
to get a hardware-configuration.nix
for the installation.
I can’t remember why exactly I mounted the ESP at /boot/efi
instead of at /boot
. I think I was trying to avoid having the kernels copied to it, but that failed, and I just never bothered to change it. I don’t think it’s necessary.
Anyway, once I had a hardware-configuration.nix
, I updated my flake, deleted /mnt/etc
, and ran nixos-install --impure --no-root-passwd --flake github:reckenrode:NixOS/nixos-configs/#khloe
. The --impure
is due to this issue in Home Manager. Once it finished, I systemctl reboot
into my new installation.
It took a few iterations to arrive at a working configuration. I learned the hard way that systemd-boot
doesn’t work for some reason, and disabling ACPI also resulted in a lot of unnecessary pain. Now that it’s working though, I can just reuse the config if I need to reinstall or set up a new one.
At the time, nixos-generate-config
wasn’t including all the modules I needed to boot with devicetree and no ACPI. I tried to figure out which ones, but I eventually gave up and just included all of them. I manually included reset_raspberrypi
because it wasn’t part of all-hardware.nix
at the time. It’s needed to boot the Pi successfully.
I ran into something similar with my SSD. The config that was generated didn’t include all the modules I needed. That’s why (as noted above) I added all-hardware.nix
to my imports in hardware-configuration.nix
(because it was easier than trying to find the specific ones I needed).