diff options
author | adisbladis <adisbladis@gmail.com> | 2022-05-14 02:38:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-14 02:38:48 +0800 |
commit | fb222e008681fce4608e94f2d1dfdf3d03a364c4 (patch) | |
tree | fc6a89202a2767cb06b8d33b6b81a115f172c146 /nixos | |
parent | 75101b2d5b27add98ebb35185fa1133ba24f3088 (diff) | |
parent | 8aa8e0ce7f137fe329608efcbb3494a5e6a63f42 (diff) |
Merge pull request #172820 from alyssais/compressed-firmware
Compressed firmware
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/hardware/all-firmware.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/hardware/udev.nix | 7 | ||||
-rw-r--r-- | nixos/modules/system/boot/kernel.nix | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/nixos/modules/hardware/all-firmware.nix b/nixos/modules/hardware/all-firmware.nix index da2bc8ffef4b0..89a1217dfb313 100644 --- a/nixos/modules/hardware/all-firmware.nix +++ b/nixos/modules/hardware/all-firmware.nix @@ -83,7 +83,6 @@ in { broadcom-bt-firmware b43Firmware_5_1_138 b43Firmware_6_30_163_46 - b43FirmwareCutter xow_dongle-firmware ] ++ optionals pkgs.stdenv.hostPlatform.isx86 [ facetimehd-calibration diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix index 2f38661718738..2e9deebbb74ab 100644 --- a/nixos/modules/services/hardware/udev.nix +++ b/nixos/modules/services/hardware/udev.nix @@ -171,6 +171,11 @@ let mv etc/udev/hwdb.bin $out ''; + compressFirmware = if config.boot.kernelPackages.kernelAtLeast "5.3" then + pkgs.compressFirmwareXz + else + id; + # Udev has a 512-character limit for ENV{PATH}, so create a symlink # tree to work around this. udevPath = pkgs.buildEnv { @@ -267,7 +272,7 @@ in ''; apply = list: pkgs.buildEnv { name = "firmware"; - paths = list; + paths = map compressFirmware list; pathsToLink = [ "/lib/firmware" ]; ignoreCollisions = true; }; diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix index fad00e39497d9..b2c92a85f7abb 100644 --- a/nixos/modules/system/boot/kernel.nix +++ b/nixos/modules/system/boot/kernel.nix @@ -273,9 +273,6 @@ in boot.kernelModules = [ "loop" "atkbd" ]; - # The Linux kernel >= 2.6.27 provides firmware. - hardware.firmware = [ kernel ]; - # Create /etc/modules-load.d/nixos.conf, which is read by # systemd-modules-load.service to load required kernel modules. environment.etc = |