From e0d66b4b92e7312f866028d3f3e82e2fe23ad2ce Mon Sep 17 00:00:00 2001 From: mexisme Date: Sun, 10 May 2026 23:23:00 +0100 Subject: [PATCH 01/12] microsoft/surface: Update to Kernel 6.19.8 -- kernel version --- microsoft/surface/common/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/microsoft/surface/common/default.nix b/microsoft/surface/common/default.nix index 32c9ce47..b3051efd 100644 --- a/microsoft/surface/common/default.nix +++ b/microsoft/surface/common/default.nix @@ -20,8 +20,8 @@ let supportedKernels = let lts-kernel = { - version = "6.18.13"; - hash = "sha256-7Sw8Vf045oNsCU/ONW8lZ/lRYTC3M1SimFeWA2jFaH8="; + version = "6.19.8"; + hash = "sha256-qtpHItuLz6C5cyhRhW1AUIK2pPouOrBnvo2xfN0RWzg="; }; in @@ -38,8 +38,8 @@ let linux-surface = pkgs.fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "829ceccd5970ed3621a30d9fcfb2fe6584a3aab7"; - hash = "sha256-H/qjP2dR5yjUvHUhI6pis+EHHSRXxc4+c4zir/pDA54="; + rev = "bf1921fc63f33d03a007fb38c4f88ff7e7bc1a55"; + hash = "sha256-AV+J1iKpA4PEsX9oVUTGlzGerTWTermia3aJSZxuu/w="; }; # Fetch and build the kernel From 03fb14a4e443d935d49290c318ab15f8c036ed7a Mon Sep 17 00:00:00 2001 From: mexisme Date: Sun, 10 May 2026 22:51:27 +0100 Subject: [PATCH 02/12] microsoft/surface: Update to Kernel 6.19.8 -- linux-surface patches --- .../surface/common/kernel/6.19/patches.nix | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 microsoft/surface/common/kernel/6.19/patches.nix diff --git a/microsoft/surface/common/kernel/6.19/patches.nix b/microsoft/surface/common/kernel/6.19/patches.nix new file mode 100644 index 00000000..e2021ca9 --- /dev/null +++ b/microsoft/surface/common/kernel/6.19/patches.nix @@ -0,0 +1,165 @@ +{ + lib, + kernel ? lib.kernel, + patchSrc, + version, +}: + +[ + { + name = "microsoft-surface-patches-linux-${version}"; + patch = null; + structuredExtraConfig = with kernel; { + ## + ## Surface Aggregator Module + ## + CONFIG_SURFACE_AGGREGATOR = module; + # CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION is not set + CONFIG_SURFACE_AGGREGATOR_BUS = yes; + CONFIG_SURFACE_AGGREGATOR_CDEV = module; + CONFIG_SURFACE_AGGREGATOR_HUB = module; + CONFIG_SURFACE_AGGREGATOR_REGISTRY = module; + CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH = module; + + CONFIG_SURFACE_ACPI_NOTIFY = module; + CONFIG_SURFACE_DTX = module; + CONFIG_SURFACE_PLATFORM_PROFILE = module; + + CONFIG_SURFACE_HID = module; + CONFIG_SURFACE_KBD = module; + + CONFIG_BATTERY_SURFACE = module; + CONFIG_CHARGER_SURFACE = module; + + CONFIG_SENSORS_SURFACE_TEMP = module; + CONFIG_SENSORS_SURFACE_FAN = module; + + CONFIG_RTC_DRV_SURFACE = module; + + ## + ## Surface Hotplug + ## + CONFIG_SURFACE_HOTPLUG = module; + + ## + ## IPTS and ITHC touchscreen + ## + ## This only enables the user interface for IPTS/ITHC data. + ## For the touchscreen to work, you need to install iptsd. + ## + CONFIG_HID_IPTS = module; + CONFIG_HID_ITHC = module; + CONFIG_INTEL_THC_HID = module; + CONFIG_INTEL_QUICKSPI = module; + + ## + ## Cameras: IPU3 + ## + CONFIG_VIDEO_DW9719 = module; + CONFIG_VIDEO_IPU3_IMGU = module; + CONFIG_VIDEO_IPU3_CIO2 = module; + CONFIG_IPU_BRIDGE = module; + CONFIG_INTEL_SKL_INT3472 = module; + CONFIG_REGULATOR_TPS68470 = module; + CONFIG_COMMON_CLK_TPS68470 = module; + CONFIG_LEDS_TPS68470 = module; + + ## + ## Cameras: Sensor drivers + ## + CONFIG_VIDEO_OV5693 = module; + CONFIG_VIDEO_OV7251 = module; + CONFIG_VIDEO_OV8865 = module; + + ## + ## Surface 3: atomisp causes problems (see issue #1095). Disable it for now. + ## + # CONFIG_INTEL_ATOMISP is not set + + ## + ## ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 + ## + CONFIG_APDS9960 = module; + + ## + ## Other Drivers + ## + CONFIG_INPUT_SOC_BUTTON_ARRAY = module; + CONFIG_SURFACE_3_POWER_OPREGION = module; + CONFIG_SURFACE_PRO3_BUTTON = module; + CONFIG_SURFACE_GPE = module; + CONFIG_SURFACE_BOOK1_DGPU_SWITCH = module; + CONFIG_HID_SURFACE = module; + + ## + ## HOTFIX FOR CVE-2026-31431 + ## + + # CONFIG_CRYPTO_USER_API_AEAD is not set + }; + } + { + name = "ms-surface/0001-secureboot"; + patch = patchSrc + "/0001-secureboot.patch"; + } + { + name = "ms-surface/0002-surface3"; + patch = patchSrc + "/0002-surface3.patch"; + } + { + name = "ms-surface/0003-mwifiex"; + patch = patchSrc + "/0003-mwifiex.patch"; + } + { + name = "ms-surface/0004-ath10k"; + patch = patchSrc + "/0004-ath10k.patch"; + } + { + name = "ms-surface/0005-ipts"; + patch = patchSrc + "/0005-ipts.patch"; + } + { + name = "ms-surface/0006-ithc"; + patch = patchSrc + "/0006-ithc.patch"; + } + { + name = "ms-surface/0007-surface-sam"; + patch = patchSrc + "/0007-surface-sam.patch"; + } + { + name = "ms-surface/0008-surface-sam-over-hid"; + patch = patchSrc + "/0008-surface-sam-over-hid.patch"; + } + { + name = "ms-surface/0009-surface-button"; + patch = patchSrc + "/0009-surface-button.patch"; + } + { + name = "ms-surface/0010-surface-typecover"; + patch = patchSrc + "/0010-surface-typecover.patch"; + } + { + name = "ms-surface/0011-surface-shutdown"; + patch = patchSrc + "/0011-surface-shutdown.patch"; + } + { + name = "ms-surface/0012-surface-gpe"; + patch = patchSrc + "/0012-surface-gpe.patch"; + } + { + name = "ms-surface/0013-cameras"; + patch = patchSrc + "/0013-cameras.patch"; + } + { + name = "ms-surface/0014-amd-gpio"; + patch = patchSrc + "/0014-amd-gpio.patch"; + } + { + name = "ms-surface/0015-rtc"; + patch = patchSrc + "/0015-rtc.patch"; + } + { + name = "ms-surface/0016-hid-surface"; + patch = patchSrc + "/0016-hid-surface.patch"; + } +] From 959cd476612c704f772e97f7cb7b4b064506d7ef Mon Sep 17 00:00:00 2001 From: mexisme Date: Sun, 10 May 2026 23:13:25 +0100 Subject: [PATCH 03/12] microsoft/surface: Update to Kernel 6.19.8 -- linux-surface patches for dirty-frag vulnerability --- .../surface/common/kernel/6.19/patches.nix | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/microsoft/surface/common/kernel/6.19/patches.nix b/microsoft/surface/common/kernel/6.19/patches.nix index e2021ca9..1ebe58ea 100644 --- a/microsoft/surface/common/kernel/6.19/patches.nix +++ b/microsoft/surface/common/kernel/6.19/patches.nix @@ -162,4 +162,36 @@ name = "ms-surface/0016-hid-surface"; patch = patchSrc + "/0016-hid-surface.patch"; } + { + name = "ms-surface/0017-dirtyfrag-xfrm-esp-avoid-in-place-decrypt-on-shared-skb-frags"; + patch = patchSrc + "/0017-dirtyfrag-xfrm-esp-avoid-in-place-decrypt-on-shared-skb-frags.patch"; + } + { + name = "ms-surface/0018-dirtyfrag-rxrpc-Fix-potential-UAF-after-skb_unshare-failure"; + patch = patchSrc + "/0018-dirtyfrag-rxrpc-Fix-potential-UAF-after-skb_unshare-failure.patch"; + } + { + name = "ms-surface/0019-dirtyfrag-rxrpc-Fix-rxrpc_input_call_event-to-only-unshare-DAT"; + patch = patchSrc + "/0019-dirtyfrag-rxrpc-Fix-rxrpc_input_call_event-to-only-unshare-DAT.patch"; + } + { + name = "ms-surface/0020-dirtyfrag-rxrpc-Fix-use-of-wrong-skb-when-comparing-queued-RES"; + patch = patchSrc + "/0020-dirtyfrag-rxrpc-Fix-use-of-wrong-skb-when-comparing-queued-RES.patch"; + } + { + name = "ms-surface/0021-dirtyfrag-rxrpc-only-handle-RESPONSE-during-service-challenge"; + patch = patchSrc + "/0021-dirtyfrag-rxrpc-only-handle-RESPONSE-during-service-challenge.patch"; + } + { + name = "ms-surface/0022-dirtyfrag-rxrpc-Fix-conn-level-packet-handling-to-unshare-RESP"; + patch = patchSrc + "/0022-dirtyfrag-rxrpc-Fix-conn-level-packet-handling-to-unshare-RESP.patch"; + } + { + name = "ms-surface/0023-dirtyfrag-rxrpc-Fix-re-decryption-of-RESPONSE-packets"; + patch = patchSrc + "/0023-dirtyfrag-rxrpc-Fix-re-decryption-of-RESPONSE-packets.patch"; + } + { + name = "ms-surface/0024-dirtyfrag-rxrpc-Also-unshare-DATA-RESPONSE-packets-when-paged-"; + patch = patchSrc + "/0024-dirtyfrag-rxrpc-Also-unshare-DATA-RESPONSE-packets-when-paged-.patch"; + } ] From 8b100f75f34bb68f0a33f9719e0b2a5dcc885de8 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Tue, 19 May 2026 20:15:14 -0700 Subject: [PATCH 04/12] raspberry-pi: add README --- raspberry-pi/README.md | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 raspberry-pi/README.md diff --git a/raspberry-pi/README.md b/raspberry-pi/README.md new file mode 100644 index 00000000..8daebdda --- /dev/null +++ b/raspberry-pi/README.md @@ -0,0 +1,56 @@ +# Raspberry Pi + +NixOS profiles and modules for Raspberry Pi boards. + +## What's here + +- `common/` has the shared bits: the `linux-rpi` kernel build (vendor defconfig, matching firmware), the `config.txt` generation module, and a pinned wireless firmware. +- `2/`, `3/`, `4/`, `5/` are the board profiles. Each one picks the right kernel and kernel params. Pi 4 and 5 also set DT filters and the initrd modules they need. +- The extra files under `4/` are opt-in toggles for Pi 4 hardware: audio, dwc2, GPIO, I2C, LEDs, the PoE HATs, touchscreens, and so on. + +## Using a board profile + +```nix +{ + imports = [ + + ]; +} +``` + +These profiles assume the `generic-extlinux-compatible` bootloader (the NixOS module that writes an `extlinux.conf` for U-Boot to read), which is what aarch64 NixOS SD images use by default. There is no `boot.loader.raspberry-pi` module here. U-Boot itself still has to land on the boot partition somehow. Either your image builder does it, or you do. Nothing in here writes to `/boot/firmware/`. See [Current limits](#current-limits). + +## `config.txt` + +Board profiles import `hardware.raspberry-pi.configtxt`, which renders `config.txt` from Nix options. The defaults track the Raspberry Pi OS pi-gen image: camera and display autodetect, KMS, audio on, `arm_boost`. + +```nix +{ + hardware.raspberry-pi.configtxt.settings = { + all = { + dtparam = [ "audio=on" ]; + dtoverlay = [ + "vc4-kms-v3d" + "disable-bt" + ]; + }; + pi5.arm_freq = 2400; + cm4.otg_mode = true; + }; +} +``` + +List values become repeated keys in the rendered file, so the `dtoverlay` above expands to: + +``` +dtoverlay=vc4-kms-v3d +dtoverlay=disable-bt +``` + +Top-level attrs are conditional sections (`all`, `pi4`, `pi5`, `cm4`, and so on). Nesting stacks filters. To drop a default, set the key to `null` with `mkForce`. + +## Current limits + +- No firmware install: Nothing writes `start*.elf`, `bootcode.bin`, `fixup*.dat`, vendor DTBs, overlays, or `config.txt` to `/boot/firmware/`. The rendered config.txt is exposed at `hardware.raspberry-pi.configtxt.file`, but nothing on disk reads it yet. You either rely on the SD-image populate step or stage those files yourself. +- No bootloader module: There's no `boot.loader.raspberry-pi` here. Boards rely on `generic-extlinux-compatible` plus U-Boot. Pi 5 boots from SD via U-Boot, but USB, PCIe, and the RP1 don't come up until Linux takes over. So a USB keyboard at the U-Boot prompt won't work on Pi 5 today. +- No Pi 0/02/1 board profiles: `common/kernel.nix` accepts `rpiVersion = 1`, but there's no `0/`, `02/`, or `1/` directory wiring that kernel up into a profile you can import via ``. From d84f0810be65ef297662a90cc6466a89e79f7b39 Mon Sep 17 00:00:00 2001 From: Malix - Alix Brunet Date: Fri, 9 Jan 2026 19:19:32 +0100 Subject: [PATCH 05/12] enhancement: remove impure `` Co-Authored-By: Jamie Magee Co-Authored-By: Doron Behar --- flake.lock | 19 ++++++++++++++++++- flake.nix | 21 ++++++++++----------- mnt/reform/updateKernelPatches.nix | 10 ++++++---- mnt/reform/updateKernelPatches.sh | 2 +- 4 files changed, 35 insertions(+), 17 deletions(-) diff --git a/flake.lock b/flake.lock index 5999137c..67a1708d 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,23 @@ { "nodes": { - "root": {} + "nixpkgs": { + "locked": { + "lastModified": 1767892417, + "narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=", + "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz" + }, + "original": { + "type": "tarball", + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } }, "root": "root", "version": 7 diff --git a/flake.nix b/flake.nix index 060b14de..8054e8d3 100644 --- a/flake.nix +++ b/flake.nix @@ -1,13 +1,17 @@ { description = "nixos-hardware"; + inputs.nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; + outputs = - { self, ... }: + { self, nixpkgs, ... }: let # Import private inputs (for development) privateInputs = (import ./tests/flake-compat.nix { - src = ./tests; + src = { + outPath = self.outPath + "/tests"; + }; }).defaultNix; systems = [ @@ -23,17 +27,10 @@ ]; # Helper to iterate over systems - eachSystem = - f: - privateInputs.nixos-unstable-small.lib.genAttrs systems ( - system: f privateInputs.nixos-unstable-small.legacyPackages.${system} system - ); + eachSystem = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system} system); eachSystemFormat = - f: - privateInputs.nixos-unstable-small.lib.genAttrs formatSystems ( - system: f privateInputs.nixos-unstable-small.legacyPackages.${system} system - ); + f: nixpkgs.lib.genAttrs formatSystems (system: f nixpkgs.legacyPackages.${system} system); in { @@ -494,6 +491,8 @@ run-tests = pkgs.callPackage ./tests/run-tests.nix { inherit self; }; + + mnt-reform-kernel-patches = pkgs.callPackage ./mnt/reform/updateKernelPatches.nix { }; } // pkgs.lib.optionalAttrs (system == "aarch64-linux") { # Boot images for NXP i.MX boards (aarch64-linux only) diff --git a/mnt/reform/updateKernelPatches.nix b/mnt/reform/updateKernelPatches.nix index 59d3e4ca..e30bd6f9 100644 --- a/mnt/reform/updateKernelPatches.nix +++ b/mnt/reform/updateKernelPatches.nix @@ -1,9 +1,11 @@ +{ + lib, + fetchFromGitLab, +}: + let - nixpkgs = import { }; - pkgs = nixpkgs.pkgs; - lib = nixpkgs.lib; sources = lib.importJSON ./sources.json; - reformDebianPackages = pkgs.fetchFromGitLab sources.reformDebianPackages; + reformDebianPackages = fetchFromGitLab sources.reformDebianPackages; in map (lib.removePrefix "${reformDebianPackages}/") ( lib.filesystem.listFilesRecursive "${reformDebianPackages}/linux/patches${lib.versions.majorMinor sources.modDirVersion}" diff --git a/mnt/reform/updateKernelPatches.sh b/mnt/reform/updateKernelPatches.sh index 032fc3af..79581c7d 100755 --- a/mnt/reform/updateKernelPatches.sh +++ b/mnt/reform/updateKernelPatches.sh @@ -1,4 +1,4 @@ #!/usr/bin/env sh -nix eval --file updateKernelPatches.nix > kernelPatches.nix +nix eval .#mnt-reform-kernel-patches > kernelPatches.nix nix fmt kernelPatches.nix From b28e08a81fe2efd8a2d55a600ccd06916a1dc48f Mon Sep 17 00:00:00 2001 From: Malix - Alix Brunet Date: Mon, 1 Jun 2026 11:44:03 +0200 Subject: [PATCH 06/12] docs: flake input fallback to default branch --- README.md | 2 +- hardkernel/odroid-m1/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d7d3507a..8ae6b21f 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ the following: ```nix { description = "NixOS configuration with flakes"; - inputs.nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + inputs.nixos-hardware.url = "github:NixOS/nixos-hardware"; outputs = { self, nixpkgs, nixos-hardware }: { # replace with your actual hostname diff --git a/hardkernel/odroid-m1/README.md b/hardkernel/odroid-m1/README.md index cb94bd9c..18bc0cfa 100644 --- a/hardkernel/odroid-m1/README.md +++ b/hardkernel/odroid-m1/README.md @@ -11,7 +11,7 @@ To create an initial SD card image for installation: { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixos-hardware.url = "github:nixos/nixos-hardware/master"; + nixos-hardware.url = "github:nixos/nixos-hardware"; }; outputs = { self, nixpkgs, nixos-hardware }: rec { nixosConfigurations.m1 = nixpkgs.lib.nixosSystem { @@ -81,7 +81,7 @@ flake: { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixos-hardware.url = "github:nixos/nixos-hardware/master"; + nixos-hardware.url = "github:nixos/nixos-hardware"; }; outputs = { nixpkgs, nixos-hardware, ... }: { nixosConfigurations.m1 = nixpkgs.lib.nixosSystem { From 485fe1c88d61d4e005495f5076c921ffbd5ce917 Mon Sep 17 00:00:00 2001 From: Malix - Alix Brunet Date: Mon, 1 Jun 2026 11:49:49 +0200 Subject: [PATCH 07/12] docs: flake input follows nixpkgs --- README.md | 9 ++++++++- hardkernel/odroid-m1/README.md | 10 ++++++++-- milkv/pioneer/README.md | 5 ++++- mnt/reform/rk3588/README.md | 5 ++++- pine64/star64/README.md | 5 ++++- radxa/README.md | 1 + starfive/visionfive/v2/README.md | 5 ++++- 7 files changed, 33 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8ae6b21f..3540f038 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,14 @@ the following: ```nix { description = "NixOS configuration with flakes"; - inputs.nixos-hardware.url = "github:NixOS/nixos-hardware"; + + inputs = { + nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; + nixos-hardware = { + url = "github:nixos/nixos-hardware"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; outputs = { self, nixpkgs, nixos-hardware }: { # replace with your actual hostname diff --git a/hardkernel/odroid-m1/README.md b/hardkernel/odroid-m1/README.md index 18bc0cfa..1dcb0716 100644 --- a/hardkernel/odroid-m1/README.md +++ b/hardkernel/odroid-m1/README.md @@ -11,7 +11,10 @@ To create an initial SD card image for installation: { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixos-hardware.url = "github:nixos/nixos-hardware"; + nixos-hardware = { + url = "github:nixos/nixos-hardware"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, nixos-hardware }: rec { nixosConfigurations.m1 = nixpkgs.lib.nixosSystem { @@ -81,7 +84,10 @@ flake: { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixos-hardware.url = "github:nixos/nixos-hardware"; + nixos-hardware = { + url = "github:nixos/nixos-hardware"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { nixpkgs, nixos-hardware, ... }: { nixosConfigurations.m1 = nixpkgs.lib.nixosSystem { diff --git a/milkv/pioneer/README.md b/milkv/pioneer/README.md index 625c9994..c361e475 100644 --- a/milkv/pioneer/README.md +++ b/milkv/pioneer/README.md @@ -6,7 +6,10 @@ Create and customize a `flake.nix` file: { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixos-hardware.url = "github:nixos/nixos-hardware"; + nixos-hardware = { + url = "github:nixos/nixos-hardware"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { nixpkgs, nixos-hardware, ... }: diff --git a/mnt/reform/rk3588/README.md b/mnt/reform/rk3588/README.md index ec6da6b6..90eee001 100644 --- a/mnt/reform/rk3588/README.md +++ b/mnt/reform/rk3588/README.md @@ -6,7 +6,10 @@ Create and configure the `flake.nix` file: ``` nix { inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - inputs.nixos-hardware.url = "github:nixos/nixos-hardware"; + inputs.nixos-hardware = { + url = "github:nixos/nixos-hardware"; + inputs.nixpkgs.follows = "nixpkgs"; + }; inputs.flake-utils.url = "github:numtide/flake-utils"; outputs = { self, nixpkgs, nixos-hardware, flake-utils, ... }: diff --git a/pine64/star64/README.md b/pine64/star64/README.md index f74da945..5ebc13fa 100644 --- a/pine64/star64/README.md +++ b/pine64/star64/README.md @@ -5,7 +5,10 @@ Create and configure the `flake.nix` file: ``` nix { inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - inputs.nixos-hardware.url = "github:nixos/nixos-hardware"; + inputs.nixos-hardware = { + url = "github:nixos/nixos-hardware"; + inputs.nixpkgs.follows = "nixpkgs"; + }; outputs = { self, nixpkgs, nixos-hardware, ... }: diff --git a/radxa/README.md b/radxa/README.md index 484f2b3f..7749eb01 100644 --- a/radxa/README.md +++ b/radxa/README.md @@ -40,6 +40,7 @@ Below is an annoated flake example to create the initial boot image. disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; nixos-hardware.url = "github:NixOS/nixos-hardware"; + nixos-hardware.inputs.nixpkgs.follows = "nixpkgs"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; nixpkgs-unfree.url = "github:numtide/nixpkgs-unfree/nixos-unstable"; }; diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md index 6ceb59bb..12ed4f5a 100644 --- a/starfive/visionfive/v2/README.md +++ b/starfive/visionfive/v2/README.md @@ -4,7 +4,10 @@ Create and configure the `flake.nix` file: ``` nix { inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - inputs.nixos-hardware.url = "github:nixos/nixos-hardware"; + inputs.nixos-hardware = { + url = "github:nixos/nixos-hardware"; + inputs.nixpkgs.follows = "nixpkgs"; + }; # Some dependencies of this flake are not yet available on non linux systems inputs.systems.url = "github:nix-systems/x86_64-linux"; From 571b99c6aa4fcf41af2c9f00197d3cfd96483e46 Mon Sep 17 00:00:00 2001 From: Malix - Alix Brunet Date: Mon, 1 Jun 2026 11:57:29 +0200 Subject: [PATCH 08/12] docs: flake input nixpkgs harmonize capitalisation --- README.md | 2 +- hardkernel/odroid-m1/README.md | 8 ++++---- milkv/pioneer/README.md | 4 ++-- mnt/reform/rk3588/README.md | 4 ++-- pine64/star64/README.md | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 3540f038..a50b2019 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ the following: inputs = { nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; nixos-hardware = { - url = "github:nixos/nixos-hardware"; + url = "github:NixOS/nixos-hardware"; inputs.nixpkgs.follows = "nixpkgs"; }; }; diff --git a/hardkernel/odroid-m1/README.md b/hardkernel/odroid-m1/README.md index 1dcb0716..98985fc3 100644 --- a/hardkernel/odroid-m1/README.md +++ b/hardkernel/odroid-m1/README.md @@ -10,9 +10,9 @@ To create an initial SD card image for installation: # flake.nix { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixos-hardware = { - url = "github:nixos/nixos-hardware"; + url = "github:NixOS/nixos-hardware"; inputs.nixpkgs.follows = "nixpkgs"; }; }; @@ -83,9 +83,9 @@ flake: # flake.nix { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixos-hardware = { - url = "github:nixos/nixos-hardware"; + url = "github:NixOS/nixos-hardware"; inputs.nixpkgs.follows = "nixpkgs"; }; }; diff --git a/milkv/pioneer/README.md b/milkv/pioneer/README.md index c361e475..bbec9706 100644 --- a/milkv/pioneer/README.md +++ b/milkv/pioneer/README.md @@ -5,9 +5,9 @@ Create and customize a `flake.nix` file: ```nix { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixos-hardware = { - url = "github:nixos/nixos-hardware"; + url = "github:NixOS/nixos-hardware"; inputs.nixpkgs.follows = "nixpkgs"; }; }; diff --git a/mnt/reform/rk3588/README.md b/mnt/reform/rk3588/README.md index 90eee001..2f72be20 100644 --- a/mnt/reform/rk3588/README.md +++ b/mnt/reform/rk3588/README.md @@ -5,9 +5,9 @@ Create and configure the `flake.nix` file: ``` nix { - inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs.nixos-hardware = { - url = "github:nixos/nixos-hardware"; + url = "github:NixOS/nixos-hardware"; inputs.nixpkgs.follows = "nixpkgs"; }; inputs.flake-utils.url = "github:numtide/flake-utils"; diff --git a/pine64/star64/README.md b/pine64/star64/README.md index 5ebc13fa..674b021a 100644 --- a/pine64/star64/README.md +++ b/pine64/star64/README.md @@ -4,9 +4,9 @@ Create and configure the `flake.nix` file: ``` nix { - inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs.nixos-hardware = { - url = "github:nixos/nixos-hardware"; + url = "github:NixOS/nixos-hardware"; inputs.nixpkgs.follows = "nixpkgs"; }; From 43bd35ee2378bf4ab2eaef3a319ed888c1338855 Mon Sep 17 00:00:00 2001 From: Malix - Alix Brunet Date: Mon, 1 Jun 2026 12:04:57 +0200 Subject: [PATCH 09/12] treewide: make nixpkgs flake inputs target hydra tarballs --- asus/zenbook/ux535/README.md | 2 +- hardkernel/odroid-m1/README.md | 4 ++-- milkv/pioneer/README.md | 2 +- mnt/reform/rk3588/README.md | 2 +- pine64/star64/README.md | 2 +- radxa/README.md | 2 +- starfive/visionfive/v2/README.md | 4 ++-- tests/flake.nix | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/asus/zenbook/ux535/README.md b/asus/zenbook/ux535/README.md index ca24e939..06b2e4ac 100644 --- a/asus/zenbook/ux535/README.md +++ b/asus/zenbook/ux535/README.md @@ -12,7 +12,7 @@ Configuration for the ScreenPad is unable to be provided here at this time, due inputs = { nixpkgs = { - url = "github:NixOS/nixpkgs/nixos-unstable"; + url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; }; screenpad-driver={ diff --git a/hardkernel/odroid-m1/README.md b/hardkernel/odroid-m1/README.md index 98985fc3..a0a38d1a 100644 --- a/hardkernel/odroid-m1/README.md +++ b/hardkernel/odroid-m1/README.md @@ -10,7 +10,7 @@ To create an initial SD card image for installation: # flake.nix { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; nixos-hardware = { url = "github:NixOS/nixos-hardware"; inputs.nixpkgs.follows = "nixpkgs"; @@ -83,7 +83,7 @@ flake: # flake.nix { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; nixos-hardware = { url = "github:NixOS/nixos-hardware"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/milkv/pioneer/README.md b/milkv/pioneer/README.md index bbec9706..58d8f1c8 100644 --- a/milkv/pioneer/README.md +++ b/milkv/pioneer/README.md @@ -5,7 +5,7 @@ Create and customize a `flake.nix` file: ```nix { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; nixos-hardware = { url = "github:NixOS/nixos-hardware"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/mnt/reform/rk3588/README.md b/mnt/reform/rk3588/README.md index 2f72be20..125a077f 100644 --- a/mnt/reform/rk3588/README.md +++ b/mnt/reform/rk3588/README.md @@ -5,7 +5,7 @@ Create and configure the `flake.nix` file: ``` nix { - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + inputs.nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; inputs.nixos-hardware = { url = "github:NixOS/nixos-hardware"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/pine64/star64/README.md b/pine64/star64/README.md index 674b021a..75402d03 100644 --- a/pine64/star64/README.md +++ b/pine64/star64/README.md @@ -4,7 +4,7 @@ Create and configure the `flake.nix` file: ``` nix { - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + inputs.nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; inputs.nixos-hardware = { url = "github:NixOS/nixos-hardware"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/radxa/README.md b/radxa/README.md index 7749eb01..41503544 100644 --- a/radxa/README.md +++ b/radxa/README.md @@ -41,7 +41,7 @@ Below is an annoated flake example to create the initial boot image. disko.inputs.nixpkgs.follows = "nixpkgs"; nixos-hardware.url = "github:NixOS/nixos-hardware"; nixos-hardware.inputs.nixpkgs.follows = "nixpkgs"; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; nixpkgs-unfree.url = "github:numtide/nixpkgs-unfree/nixos-unstable"; }; diff --git a/starfive/visionfive/v2/README.md b/starfive/visionfive/v2/README.md index 12ed4f5a..98c0167e 100644 --- a/starfive/visionfive/v2/README.md +++ b/starfive/visionfive/v2/README.md @@ -3,9 +3,9 @@ Create and configure the `flake.nix` file: ``` nix { - inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + inputs.nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"; inputs.nixos-hardware = { - url = "github:nixos/nixos-hardware"; + url = "github:NixOS/nixos-hardware"; inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/tests/flake.nix b/tests/flake.nix index 1d192b96..6300a3ab 100644 --- a/tests/flake.nix +++ b/tests/flake.nix @@ -2,8 +2,8 @@ description = "Private dev inputs for nixos-hardware"; inputs = { - nixos-unstable-small.url = "github:NixOS/nixpkgs/nixos-unstable-small"; - nixos-stable.url = "github:NixOS/nixpkgs/nixos-25.11"; + nixos-unstable-small.url = "https://channels.nixos.org/nixos-unstable-small/nixexprs.tar.xz"; + nixos-stable.url = "https://channels.nixos.org/nixos-25.11/nixexprs.tar.xz"; treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.inputs.nixpkgs.follows = "nixos-unstable-small"; }; From e678820fd53559ce8aeede509c61068474ffc224 Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Thu, 4 Jun 2026 21:48:03 +0400 Subject: [PATCH 10/12] nxp: imx93-atf: fix GCC header-guard build failure GCC 14+ treats the mismatched TRDC header guard in imx-atf as a hard error (-Werror=header-guard), so bl31.bin does not build on our pinned revision. Fetch the upstream fix (e194a14) as a patch without bumping the ATF revision. --- nxp/imx93-evk/bsp/imx93-atf.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nxp/imx93-evk/bsp/imx93-atf.nix b/nxp/imx93-evk/bsp/imx93-atf.nix index 634cca19..aff26c85 100644 --- a/nxp/imx93-evk/bsp/imx93-atf.nix +++ b/nxp/imx93-evk/bsp/imx93-atf.nix @@ -1,6 +1,7 @@ { lib, fetchgit, + fetchpatch, stdenv, buildPackages, pkgsCross, @@ -22,6 +23,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-a8F+Lf8pwML+tCwawS0N/mrSXWPmFhlUeOg0MCRK3VE="; }; + patches = [ + (fetchpatch { + name = "imx93-trdc-header-guard.patch"; + url = "https://github.com/nxp-imx/imx-atf/commit/e194a14ec55f13386babc80c90098874367ab3d6.patch"; + sha256 = "sha256-uXRgeyFmxDww93nJe04aoOLml2R7IbABZLhywyYmePk="; + }) + ]; + # Compiler dependencies depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ pkgsCross.aarch64-embedded.stdenv.cc ]; From d66213a72e9ff9db04ebc0aaad4e33ea3d371b04 Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Fri, 5 Jun 2026 08:20:07 +0400 Subject: [PATCH 11/12] nxp: imx93-evk: fix cross-build of mkimage host tools When building the imx93 SD image from x86_64, imx93-boot used target pkgs for the imx-mkimage derivation and its native tools (git, dtc, xxd). mkimage runs on the build machine, but Nix tried to cross-compile git for aarch64 and failed with "linker `cc` not found" while building libgitcore, blocking flash.bin and the SD image. Build mkimage with buildPackages (host tools) while keeping firmware inputs (ATF, U-Boot, OP-TEE, etc.) from target pkgs. --- nxp/imx93-evk/bsp/imx93-boot.nix | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/nxp/imx93-evk/bsp/imx93-boot.nix b/nxp/imx93-evk/bsp/imx93-boot.nix index c11f31d5..c328a6da 100644 --- a/nxp/imx93-evk/bsp/imx93-boot.nix +++ b/nxp/imx93-evk/bsp/imx93-boot.nix @@ -1,8 +1,8 @@ { pkgs, }: -with pkgs; let + bp = pkgs.buildPackages; imx93-atf = pkgs.callPackage ./imx93-atf.nix { }; imx93-firmware = pkgs.callPackage ./imx93-firmware.nix { }; @@ -17,7 +17,8 @@ let shortRev = builtins.substring 0 8 src.rev; in { - imx93-boot = pkgs.stdenv.mkDerivation rec { + # mkimage runs on the build machine; use buildPackages when cross-compiling. + imx93-boot = bp.stdenv.mkDerivation { inherit src; name = "imx93-mkimage"; version = "lf-6.12.3"; @@ -25,28 +26,22 @@ in postPatch = '' substituteInPlace Makefile \ --replace 'git rev-parse --short=8 HEAD' 'echo ${shortRev}' - substituteInPlace Makefile \ - --replace 'CC = gcc' 'CC = clang' substituteInPlace iMX93/soc.mak \ - --replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" + --replace 'xxd' "${bp.vim.xxd}/bin/xxd" substituteInPlace scripts/fspi_fcb_gen.sh \ - --replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" + --replace 'xxd' "${bp.vim.xxd}/bin/xxd" substituteInPlace scripts/fspi_packer.sh \ - --replace 'xxd' "${pkgs.vim.xxd}/bin/xxd" + --replace 'xxd' "${bp.vim.xxd}/bin/xxd" patchShebangs scripts ''; nativeBuildInputs = [ - clang - git - dtc - ]; - - buildInputs = [ - git - glibc.static - zlib - zlib.static + bp.stdenv.cc + bp.git + bp.dtc + bp.glibc.static + bp.zlib + bp.zlib.static ]; buildPhase = '' From 307a84fc96911cb54dc8d7b55356a17fb880cb00 Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Fri, 5 Jun 2026 15:20:26 +0400 Subject: [PATCH 12/12] compulab: ucm-imx95: fix cross-build of mkimage host tools imx-mkimage runs on the build machine, but ucm-imx95-boot used target stdenv and forced clang. Cross-building the SD image from x86_64 then failed building mkimage_imx8 with "stdio.h not found", blocking flash.bin. Build mkimage with buildPackages; keep firmware blobs from target pkgs. --- compulab/ucm-imx95/bsp/ucm-imx95-boot.nix | 53 +++++++++-------------- compulab/ucm-imx95/overlay.nix | 2 +- nxp/imx93-evk/bsp/imx93-atf.nix | 2 +- 3 files changed, 23 insertions(+), 34 deletions(-) diff --git a/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix index e49ff90e..83a9a28c 100644 --- a/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix +++ b/compulab/ucm-imx95/bsp/ucm-imx95-boot.nix @@ -1,24 +1,17 @@ { - callPackage, - fetchFromGitHub, - stdenv, - clang, - git, - dtc, - glibc, - zlib, - vim, + pkgs, }: let + bp = pkgs.buildPackages; - imx95-atf = callPackage ./ucm-imx95-atf.nix { }; - imx95-firmware = callPackage ./ucm-imx95-firmware.nix { }; - imx95-uboot = callPackage ./ucm-imx95-uboot.nix { }; - imx95-optee-os = callPackage ./ucm-imx95-optee-os.nix { }; - imx95-sm-fw = callPackage ./ucm-imx95-sm-fw.nix { }; - imx95-oei-ddr = callPackage ./ucm-imx95-oei-ddr.nix { }; - imx95-oei-tcm = callPackage ./ucm-imx95-oei-tcm.nix { }; - src = fetchFromGitHub { + imx95-atf = pkgs.callPackage ./ucm-imx95-atf.nix { }; + imx95-firmware = pkgs.callPackage ./ucm-imx95-firmware.nix { }; + imx95-uboot = pkgs.callPackage ./ucm-imx95-uboot.nix { }; + imx95-optee-os = pkgs.callPackage ./ucm-imx95-optee-os.nix { }; + imx95-sm-fw = pkgs.callPackage ./ucm-imx95-sm-fw.nix { }; + imx95-oei-ddr = pkgs.callPackage ./ucm-imx95-oei-ddr.nix { }; + imx95-oei-tcm = pkgs.callPackage ./ucm-imx95-oei-tcm.nix { }; + src = pkgs.fetchFromGitHub { owner = "nxp-imx"; repo = "imx-mkimage"; #tag: lf-6.6.52-2.2.1 @@ -28,7 +21,8 @@ let shortRev = builtins.substring 0 8 src.rev; in { - imx95-boot = stdenv.mkDerivation rec { + # mkimage runs on the build machine; use buildPackages when cross-compiling. + imx95-boot = bp.stdenv.mkDerivation { inherit src; name = "imx95-mkimage"; version = "lf-6.6.52-2.2.1"; @@ -36,27 +30,22 @@ in postPatch = '' substituteInPlace Makefile \ --replace-fail 'git rev-parse --short=8 HEAD' 'echo ${shortRev}' - substituteInPlace Makefile \ - --replace-fail 'CC = gcc' 'CC = clang' substituteInPlace iMX95/soc.mak \ - --replace-fail 'xxd' "${vim.xxd}/bin/xxd" + --replace-fail 'xxd' "${bp.vim.xxd}/bin/xxd" substituteInPlace scripts/fspi_fcb_gen.sh \ - --replace-fail 'xxd' "${vim.xxd}/bin/xxd" + --replace-fail 'xxd' "${bp.vim.xxd}/bin/xxd" substituteInPlace scripts/fspi_packer.sh \ - --replace-fail 'xxd' "${vim.xxd}/bin/xxd" + --replace-fail 'xxd' "${bp.vim.xxd}/bin/xxd" patchShebangs scripts ''; nativeBuildInputs = [ - clang - git - dtc - ]; - - buildInputs = [ - glibc.static - zlib - zlib.static + bp.stdenv.cc + bp.git + bp.dtc + bp.glibc.static + bp.zlib + bp.zlib.static ]; buildPhase = '' diff --git a/compulab/ucm-imx95/overlay.nix b/compulab/ucm-imx95/overlay.nix index 516f9e79..942a3711 100644 --- a/compulab/ucm-imx95/overlay.nix +++ b/compulab/ucm-imx95/overlay.nix @@ -1,3 +1,3 @@ final: _prev: { - inherit (final.callPackage ./bsp/ucm-imx95-boot.nix { }) imx95-boot; + inherit (final.callPackage ./bsp/ucm-imx95-boot.nix { pkgs = final; }) imx95-boot; } diff --git a/nxp/imx93-evk/bsp/imx93-atf.nix b/nxp/imx93-evk/bsp/imx93-atf.nix index aff26c85..7caaaa7b 100644 --- a/nxp/imx93-evk/bsp/imx93-atf.nix +++ b/nxp/imx93-evk/bsp/imx93-atf.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { (fetchpatch { name = "imx93-trdc-header-guard.patch"; url = "https://github.com/nxp-imx/imx-atf/commit/e194a14ec55f13386babc80c90098874367ab3d6.patch"; - sha256 = "sha256-uXRgeyFmxDww93nJe04aoOLml2R7IbABZLhywyYmePk="; + sha256 = "sha256-K1JECateo4mUrOaV41PUmCXHn7DfmgRQXx4KdcIALqE="; }) ];