nixpkgs-suyu/nixos/modules/services/hardware
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
..
sane_extra_backends
acpid.nix
actkbd.nix
auto-cpufreq.nix
bluetooth.nix
bolt.nix
brltty.nix
ddccontrol.nix
fancontrol.nix
freefall.nix
fwupd.nix
illum.nix illum: Restart service on failure 2022-05-05 22:31:56 +02:00
interception-tools.nix
irqbalance.nix
joycond.nix
lcd.nix
lirc.nix
nvidia-optimus.nix
pcscd.nix
pommed.nix
power-profiles-daemon.nix
rasdaemon.nix
ratbagd.nix
sane.nix
spacenavd.nix
tcsd.nix
thermald.nix
thinkfan.nix
throttled.nix
tlp.nix
trezord.nix
trezord.xml
triggerhappy.nix
udev.nix nixos/udev: compress all firmware if supported 2022-05-13 14:36:34 +00:00
udisks2.nix nixos/udisks2: add freeform settings 2022-04-03 09:40:53 +03:00
undervolt.nix
upower.nix
usbmuxd.nix
usbrelayd.nix nixos/usbrelayd: set myself as module maintainer 2022-05-08 21:44:50 +02:00
vdr.nix
xow.nix