nixpkgs-suyu/pkgs
Alyssa Ross 8aa8e0ce7f
nixos/udev: compress all firmware if supported
This should be a significant disk space saving for most NixOS
installations.  This method is a bit more complicated than doing it in
the postInstall for the firmware derivations, but this way it's
automatic, so each firmware package doesn't have to separately
implement its compression.

Currently, only xz compression is supported, but it's likely that
future versions of Linux will additionally support zstd, so I've
written the code in such a way that it would be very easy to implement
zstd compression for those kernels when they arrive, falling back to
xz for older (current) kernels.

I chose the highest possible level of compression (xz -9) because even
at this level, decompression time is negligible.  Here's how long it took
to decompress every firmware file my laptop uses:

	i915/kbl_dmc_ver1_04.bin                  	2ms
	regulatory.db                             	4ms
	regulatory.db.p7s                         	3ms
	iwlwifi-7265D-29.ucode                    	62ms
	9d71-GOOGLE-EVEMAX-0-tplg.bin             	22ms
	intel/dsp_fw_kbl.bin                      	65ms
	dsp_lib_dsm_core_spt_release.bin          	6ms
	intel/ibt-hw-37.8.10-fw-22.50.19.14.f.bseq	7ms

And since booting NixOS is a parallel process, it's unlikely (but
difficult to measure) that the time to user interaction was held up at
all by most of these.

Fixes (partially?) #148197
2022-05-13 14:36:34 +00:00
..
applications Merge pull request #172443 from a-m-joseph/pr/zhf/vhd2vl 2022-05-12 10:06:04 +02:00
build-support nixos/udev: compress all firmware if supported 2022-05-13 14:36:34 +00:00
common-updater
data Merge pull request #170354 from serge-belov/sb-nixpkgs-abyssinica 2022-05-11 17:01:13 +02:00
desktops gnome.pomodoro: 20.0 -> 21.1 (#172147) 2022-05-11 00:51:42 +02:00
development Merge pull request #172650 from r-ryantm/auto-update/python3.10-puremagic 2022-05-12 10:27:26 +02:00
games factorio: 1.1.57 -> 1.1.59 2022-05-11 11:24:51 -07:00
misc cliscord: fix build on Darwin 2022-05-11 16:51:17 -05:00
os-specific linux: support loading compressed firmware 2022-05-12 15:29:17 +00:00
pkgs-lib
servers Merge pull request #172285 from r-ryantm/auto-update/jitsi-meet 2022-05-11 23:47:26 +03:00
shells Merge pull request #171301 from RamKromberg/fix/rc 2022-05-11 17:02:31 +02:00
stdenv Merge pull request #157106 from lheckemann/better-error-for-bad-buildinputs 2022-05-11 11:28:11 +02:00
test
tools getmail6: 6.18.8 -> 6.18.9 2022-05-12 01:33:22 -07:00
top-level nixos/udev: compress all firmware if supported 2022-05-13 14:36:34 +00:00