···171171 };
172172173173 hardware.firmware = mkOption {
174174- type = types.listOf types.path;
174174+ type = types.listOf types.package;
175175 default = [];
176176 description = ''
177177- List of directories containing firmware files. Such files
177177+ List of packages containing firmware files. Such files
178178 will be loaded automatically if the kernel asks for them
179179 (i.e., when it has detected specific hardware that requires
180180- firmware to function). If more than one path contains a
181181- firmware file with the same name, the first path in the list
182182- takes precedence. Note that you must rebuild your system if
183183- you add files to any of these directories. For quick testing,
180180+ firmware to function). If multiple packages contain firmware
181181+ files with the same name, the first package in the list takes
182182+ precedence. Note that you must rebuild your system if you add
183183+ files to any of these directories. For quick testing,
184184 put firmware files in <filename>/root/test-firmware</filename>
185185- and add that directory to the list. Note that you can also
186186- add firmware packages to this list as these are directories in
187187- the nix store.
185185+ and add that directory to the list.
188186 '';
189187 apply = list: pkgs.buildEnv {
190188 name = "firmware";
191189 paths = list;
192192- pathsToLink = [ "/" ];
190190+ pathsToLink = [ "/lib/firmware" ];
193191 ignoreCollisions = true;
194192 };
195193 };
···236234 (isYes "NET")
237235 ];
238236239239- boot.extraModprobeConfig = "options firmware_class path=${config.hardware.firmware}";
237237+ boot.extraModprobeConfig = "options firmware_class path=${config.hardware.firmware}/lib/firmware";
240238241239 system.activationScripts.udevd =
242240 ''
···254252255253 # Allow the kernel to find our firmware.
256254 if [ -e /sys/module/firmware_class/parameters/path ]; then
257257- echo -n "${config.hardware.firmware}" > /sys/module/firmware_class/parameters/path
255255+ echo -n "${config.hardware.firmware}/lib/firmware" > /sys/module/firmware_class/parameters/path
258256 fi
259257 '';
260258