Author: eelco
Date: Sun Mar 18 14:03:42 2012
New Revision: 33234
URL: https://nixos.org/websvn/nix/?rev=33234&sc=1
Log:
* Move the implementation of boot.kernelModules to udev's postStart.
It needs udevd to be running because the modules may require
firmware. Thanks to Mathijs and Arie for pointing this out.
Modified:
nixos/trunk/modules/hardware/cpu/intel-microcode.nix
nixos/trunk/modules/services/hardware/udev.nix
nixos/trunk/modules/system/boot/modprobe.nix
Modified: nixos/trunk/modules/hardware/cpu/intel-microcode.nix
==============================================================================
--- nixos/trunk/modules/hardware/cpu/intel-microcode.nix Sun Mar 18
11:45:53 2012 (r33233)
+++ nixos/trunk/modules/hardware/cpu/intel-microcode.nix Sun Mar 18
14:03:42 2012 (r33234)
@@ -23,17 +23,7 @@
config = mkIf config.hardware.cpu.intel.updateMicrocode {
hardware.firmware = [ pkgs.microcodeIntel ];
-
- # This cannot be done using boot.kernelModules
- # discussion at
http://lists.science.uu.nl/pipermail/nix-dev/2012-February/007959.html
- jobs.microcode = {
- name = "microcode";
- description = "load microcode";
- startOn = "started udev";
- exec = "modprobe microcode";
- path = [config.system.sbin.modprobe];
- task = true;
- };
+ boot.kernelModules = [ "microcode" ];
};
}
Modified: nixos/trunk/modules/services/hardware/udev.nix
==============================================================================
--- nixos/trunk/modules/services/hardware/udev.nix Sun Mar 18 11:45:53
2012 (r33233)
+++ nixos/trunk/modules/services/hardware/udev.nix Sun Mar 18 14:03:42
2012 (r33234)
@@ -236,6 +236,17 @@
daemonType = "fork";
exec = "udevd --daemon";
+
+ postStart =
+ ''
+ # Do the loading of additional stage 2 kernel modules.
+ # This needs to be done while udevd is running, because
+ # the modules may call upon udev's firmware loading rule.
+ for i in ${toString config.boot.kernelModules}; do
+ echo "loading kernel module ā$iā..."
+ ${config.system.sbin.modprobe}/sbin/modprobe $i || true
+ done
+ '';
};
jobs.udevtrigger =
Modified: nixos/trunk/modules/system/boot/modprobe.nix
==============================================================================
--- nixos/trunk/modules/system/boot/modprobe.nix Sun Mar 18 11:45:53
2012 (r33233)
+++ nixos/trunk/modules/system/boot/modprobe.nix Sun Mar 18 14:03:42
2012 (r33234)
@@ -100,11 +100,6 @@
# We need this when the kernel (or some module) auto-loads a
# module.
echo ${config.system.sbin.modprobe}/sbin/modprobe >
/proc/sys/kernel/modprobe
-
- # Do the loading of additional stage 2 kernel modules.
- for i in ${toString config.boot.kernelModules}; do
- ${config.system.sbin.modprobe}/sbin/modprobe $i || true
- done
'';
};
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits