aarch64 Hosts (Raspberry Pi)
DNF manages aarch64 nodes exactly the same as x86_64 nodes: they are
declared in etc/config.yaml, built and deployed with the same
commands. Hardware support (kernel, firmware, bootloader) comes from the
nixos-raspberrypi 🡕 flake.
Declare an aarch64 Host
Section titled “Declare an aarch64 Host”A host’s architecture is set with the arch field, in the
cpu[:board] format. When this field is absent, the host is a standard x86_64.
arch value | Machine |
|---|---|
x86_64 (default) | PC / x86_64 server |
aarch64:rpi02 | Raspberry Pi Zero 2 W |
aarch64:rpi3 | Raspberry Pi 3 |
aarch64:rpi4 | Raspberry Pi 4 |
aarch64:rpi5 | Raspberry Pi 5 |
hosts: - hostname: "pi" name: "Raspberry Pi du salon" zone: "maison:1.20" arch: "aarch64:rpi5" profile: "server" users: ["alice"] services: homepage:How It Works
Section titled “How It Works”-
Generation —
just generatevalidatesarchthen writes it as-is intovar/generated/hosts.nix. -
Interpretation — the framework splits
cpu:boardinto a NixOS system (aarch64-linux) and a board model (rpi5→raspberry-pi-5). -
Hardware injection — for a Raspberry Pi board, the nixos-raspberrypi modules (kernel and vendor firmware, bootloader, binary cache) are automatically added to the node configuration.
-
Building — Colmena builds this node with a dedicated aarch64
nixpkgs, transparent to the rest of the fleet.
Build Prerequisites
Section titled “Build Prerequisites”Building aarch64 from an x86_64 administration machine requires one of these three approaches:
- Build on target: deploy with Colmena using
build-on-target, the Raspberry Pi compiles itself (native but slow). - Remote aarch64 builder: delegate building to an ARM machine (fastest for a large fleet).
Install a Raspberry Pi
Section titled “Install a Raspberry Pi”A bootable SD image boots the Pi, which is then integrated into the fleet like any other node (see initial installation).
-
Build the SD image (choose the attribute matching your model):
Fenêtre de terminal nix build .#nixosConfigurations.sd-image-raspberry-pi-5.config.system.build.sdImage -
Write the image to the card:
Fenêtre de terminal zstd -dc result/sd-image/*.img.zst | sudo dd of=/dev/sdX bs=4M status=progress conv=fsync -
First boot — connected to the network (Ethernet, or Wi-Fi for boards without a wired port like the Zero 2 W), the Pi gets an address via DHCP (name
dnf-install), with SSH enabled and thenixuser authorized by the administration key (usr/secrets/nix.pub). -
Declare then deploy — add the host to
etc/config.yamlwith itsarch, runjust generate, then deploy the actual configuration (deployment).