Change firmware handling
This way should work with both old udev and new one. svn path=/nixos/trunk/; revision=21308
This commit is contained in:
parent
a30637aba5
commit
a5718503e5
@ -134,7 +134,7 @@ in
|
|||||||
|
|
||||||
hardware.firmware = mkOption {
|
hardware.firmware = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
example = ["/root/my-firmware"];
|
example = [/root/my-firmware];
|
||||||
merge = mergeListOption;
|
merge = mergeListOption;
|
||||||
description = ''
|
description = ''
|
||||||
List of directories containing firmware files. Such files
|
List of directories containing firmware files. Such files
|
||||||
@ -142,6 +142,11 @@ in
|
|||||||
(i.e., when it has detected specific hardware that requires
|
(i.e., when it has detected specific hardware that requires
|
||||||
firmware to function).
|
firmware to function).
|
||||||
'';
|
'';
|
||||||
|
apply = list: pkgs.buildEnv {
|
||||||
|
name = "firmware";
|
||||||
|
paths = list;
|
||||||
|
pathsToLink = [ "/" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -157,7 +162,8 @@ in
|
|||||||
|
|
||||||
# As a fallback, allow firmware to be placed in
|
# As a fallback, allow firmware to be placed in
|
||||||
# /root/test-firmware (primarily for testing).
|
# /root/test-firmware (primarily for testing).
|
||||||
hardware.firmware = [ "/root/test-firmware" ];
|
hardware.firmware = pkgs.lib.optional
|
||||||
|
(builtins.pathExists /root/test-firmware) /root/test-firmware;
|
||||||
|
|
||||||
jobs.udev =
|
jobs.udev =
|
||||||
{ startOn = "startup";
|
{ startOn = "startup";
|
||||||
|
@ -79,6 +79,7 @@ let
|
|||||||
ln -s ${config.system.build.etc}/etc $out/etc
|
ln -s ${config.system.build.etc}/etc $out/etc
|
||||||
ln -s ${config.system.path} $out/sw
|
ln -s ${config.system.path} $out/sw
|
||||||
ln -s ${config.system.build.upstart} $out/upstart
|
ln -s ${config.system.build.upstart} $out/upstart
|
||||||
|
ln -s ${config.hardware.firmware} $out/firmware
|
||||||
|
|
||||||
echo "$kernelParams" > $out/kernel-params
|
echo "$kernelParams" > $out/kernel-params
|
||||||
echo "$configurationName" > $out/configuration-name
|
echo "$configurationName" > $out/configuration-name
|
||||||
|
Loading…
Reference in New Issue
Block a user