Files
Jörg Thalheim f1498c9c56 nixos/facter: fix collectDrivers returning nested lists
The collectDrivers function was using lib.catAttrs which extracts
attribute values into a list. Since driver_modules is already a list,
this resulted in nested lists like [["i915"]] instead of ["i915"],
causing boot.initrd.kernelModules to fail with:

  error: expected a string but found a list: [ "i915" ]

Restore the original foldl' implementation from nixos-facter-modules
that properly concatenates driver_modules lists into a flat result.

Add graphics_card and monitor entries to test data to catch this
regression.

Fixes: https://github.com/NixOS/nixpkgs/pull/466808#issuecomment-2749380083
2025-12-17 16:33:41 +01:00

44 lines
695 B
JSON

{
"version": 1,
"system": "x86_64-linux",
"virtualisation": "kvm",
"hardware": {
"bios": {
"smbios_version": 520
},
"cpu": [
{
"architecture": "x86_64",
"vendor_name": "AuthenticAMD",
"family": 25,
"model": 33
}
],
"graphics_card": [
{
"driver_modules": [
"i915"
]
}
],
"monitor": [
{
"model": "Test Monitor"
}
],
"system": {
"form_factor": "desktop"
}
},
"smbios": {
"bios": {
"vendor": "SeaBIOS",
"version": "test"
},
"system": {
"manufacturer": "QEMU",
"product": "Standard PC"
}
}
}