summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2022-10-02 21:18:22 +0800
committerAlyssa Ross <hi@alyssa.is>2022-10-07 19:40:58 +0000
commit309ea5a1af3b551eb991cfd93580c5f0bc893326 (patch)
tree03a589756af38b92ca03cabda87dc59d4fbbd298 /nixos
parent637d01853e699487643ad96d802deae387000723 (diff)
nixos/udev: allow marking firmware as not compressible
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/hardware/udev.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix
index fa9d06b441af..4b962da0c037 100644
--- a/nixos/modules/services/hardware/udev.nix
+++ b/nixos/modules/services/hardware/udev.nix
@@ -171,10 +171,10 @@ let
mv etc/udev/hwdb.bin $out
'';
- compressFirmware = if config.boot.kernelPackages.kernelAtLeast "5.3" then
- pkgs.compressFirmwareXz
+ compressFirmware = firmware: if (config.boot.kernelPackages.kernelAtLeast "5.3" && (firmware.compressFirmware or true)) then
+ pkgs.compressFirmwareXz firmware
else
- id;
+ id firmware;
# Udev has a 512-character limit for ENV{PATH}, so create a symlink
# tree to work around this.