From 2b3f77b716f8cec333ff72e8a70cf1851a023f4e Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Wed, 2 Feb 2022 22:58:27 +0300 Subject: [PATCH] nixos/udev: set firmware path in a separate modprobe.d file This way we don't bloat ramdisk with the whole Linux firmware packages. --- nixos/modules/services/hardware/udev.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix index d48b5444677c..61448af2d33b 100644 --- a/nixos/modules/services/hardware/udev.nix +++ b/nixos/modules/services/hardware/udev.nix @@ -317,7 +317,8 @@ in (isYes "NET") ]; - boot.extraModprobeConfig = "options firmware_class path=${config.hardware.firmware}/lib/firmware"; + # We don't place this into `extraModprobeConfig` so that stage-1 ramdisk doesn't bloat. + environment.etc."modprobe.d/firmware.conf".text = "options firmware_class path=${config.hardware.firmware}/lib/firmware"; system.activationScripts.udevd = ''