Skip to content

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.

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 valueMachine
x86_64 (default)PC / x86_64 server
aarch64:rpi02Raspberry Pi Zero 2 W
aarch64:rpi3Raspberry Pi 3
aarch64:rpi4Raspberry Pi 4
aarch64:rpi5Raspberry Pi 5
etc/config.yaml
hosts:
- hostname: "pi"
name: "Raspberry Pi du salon"
zone: "maison:1.20"
arch: "aarch64:rpi5"
profile: "server"
users: ["alice"]
services:
homepage:
  1. Generationjust generate validates arch then writes it as-is into var/generated/hosts.nix.

  2. Interpretation — the framework splits cpu:board into a NixOS system (aarch64-linux) and a board model (rpi5raspberry-pi-5).

  3. 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.

  4. Building — Colmena builds this node with a dedicated aarch64 nixpkgs, transparent to the rest of the fleet.

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).

A bootable SD image boots the Pi, which is then integrated into the fleet like any other node (see initial installation).

  1. 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
  2. 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
  3. 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 the nix user authorized by the administration key (usr/secrets/nix.pub).

  4. Declare then deploy — add the host to etc/config.yaml with its arch, run just generate, then deploy the actual configuration (deployment).