mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
87c102ce2e
svn path=/nixos/trunk/; revision=32477
35 lines
654 B
Nix
35 lines
654 B
Nix
{pkgs, config, ...}:
|
|
|
|
{
|
|
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
hardware.cpu.intel.updateMicrocode = pkgs.lib.mkOption {
|
|
default = false;
|
|
type = pkgs.lib.types.bool;
|
|
description = ''
|
|
Update the CPU microcode for intel processors.
|
|
'';
|
|
};
|
|
|
|
};
|
|
|
|
|
|
###### implementation
|
|
|
|
config = pkgs.lib.mkIf config.hardware.cpu.intel.updateMicrocode {
|
|
hardware.firmware = [pkgs.microcodeIntel];
|
|
jobs.microcode = {
|
|
name = "microcode";
|
|
description = "load microcode";
|
|
startOn = "started udev";
|
|
exec = "modprobe microcode";
|
|
path = [config.system.sbin.modprobe];
|
|
task = true;
|
|
};
|
|
};
|
|
|
|
}
|