From 2fc39a5f153dbdd7931472f8de43badd56c44cb7 Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Tue, 16 Jun 2026 13:25:02 +0100 Subject: [PATCH] feat(rpi5): add placeholder hardware-configuration Committed so the lyrathorpe-rpi5 host evaluates in CI before the Pi is provisioned. It is a placeholder, not a bootable config: on first install, regenerate it on the device with nixos-generate-config and replace this file. Excluded from formatters/linters by the existing hardware-configuration.nix rules. --- .../machine/RPi5/hardware-configuration.nix | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 system/machine/RPi5/hardware-configuration.nix diff --git a/system/machine/RPi5/hardware-configuration.nix b/system/machine/RPi5/hardware-configuration.nix new file mode 100644 index 0000000..8ec7411 --- /dev/null +++ b/system/machine/RPi5/hardware-configuration.nix @@ -0,0 +1,31 @@ +# PLACEHOLDER hardware configuration for the Raspberry Pi 5. +# +# This file is NOT the real generated config -- it exists only so the host +# evaluates in CI before the Pi is provisioned. The machine will not boot from +# it as-is. On first install, regenerate this file on the device with +# nixos-generate-config --root /mnt +# and replace this placeholder with the output (commit it). See ./README.md. +# +# Like every hardware-configuration.nix in this repo, this file is excluded from +# the formatter and linters (see the pre-commit/treefmt excludes in flake.nix). +{ modulesPath, ... }: +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + nixpkgs.hostPlatform = "aarch64-linux"; + + # The Raspberry Pi 5 boots from an SD card / USB with a FAT firmware partition + # and an ext4 root. Labels match the conventional sd-image layout; the real + # generated config will use by-uuid device paths instead. + fileSystems."/" = { + device = "/dev/disk/by-label/NIXOS_SD"; + fsType = "ext4"; + }; + + fileSystems."/boot/firmware" = { + device = "/dev/disk/by-label/FIRMWARE"; + fsType = "vfat"; + }; + + swapDevices = [ ]; +}