From 6ad46e7452d0bd5926fcbe96d79a54adad974187 Mon Sep 17 00:00:00 2001 From: steffen Date: Sat, 14 Mar 2026 14:56:10 +0100 Subject: [PATCH] fix Pi build and CI pipeline ordering - Fix Pi kernel build: disable includeDefaultModules in initrd. NixOS all-hardware.nix includes dw-hdmi which doesn't exist in the RPi4 kernel 6.12, causing module-shrunk to fail. - Fix CI: SD image build now depends on build-hosts instead of flake-check, so it won't run if the Pi build fails. - Apply same fix to raspberry-pi template. --- .forgejo/workflows/deploy.yml | 2 +- hosts/cryodev-pi/hardware.nix | 14 +++++++++----- templates/raspberry-pi/hardware.nix | 14 +++++++++----- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml index d69d66e..d7d7fd8 100644 --- a/.forgejo/workflows/deploy.yml +++ b/.forgejo/workflows/deploy.yml @@ -29,7 +29,7 @@ jobs: run: nix build .#nixosConfigurations.cryodev-pi.config.system.build.toplevel --impure build-pi-images: - needs: flake-check + needs: build-hosts runs-on: host strategy: matrix: diff --git a/hosts/cryodev-pi/hardware.nix b/hosts/cryodev-pi/hardware.nix index a0d751a..bb0722b 100644 --- a/hosts/cryodev-pi/hardware.nix +++ b/hosts/cryodev-pi/hardware.nix @@ -3,11 +3,15 @@ { boot = { kernelPackages = pkgs.linuxKernel.packages.linux_rpi4; - initrd.availableKernelModules = [ - "xhci_pci" - "usbhid" - "usb_storage" - ]; + initrd = { + availableKernelModules = [ + "xhci_pci" + "usbhid" + "usb_storage" + ]; + # Disable default x86 modules that don't exist in the Pi kernel (e.g. dw-hdmi) + includeDefaultModules = false; + }; }; fileSystems = { diff --git a/templates/raspberry-pi/hardware.nix b/templates/raspberry-pi/hardware.nix index a0d751a..bb0722b 100644 --- a/templates/raspberry-pi/hardware.nix +++ b/templates/raspberry-pi/hardware.nix @@ -3,11 +3,15 @@ { boot = { kernelPackages = pkgs.linuxKernel.packages.linux_rpi4; - initrd.availableKernelModules = [ - "xhci_pci" - "usbhid" - "usb_storage" - ]; + initrd = { + availableKernelModules = [ + "xhci_pci" + "usbhid" + "usb_storage" + ]; + # Disable default x86 modules that don't exist in the Pi kernel (e.g. dw-hdmi) + includeDefaultModules = false; + }; }; fileSystems = {