summary refs log tree commit diff
path: root/nixos/modules/hardware/cpu/intel-microcode.nix
blob: 800c391b293a17e54912669d564d5664944c3689 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ config, lib, pkgs, ... }:

with lib;

{

  ###### interface

  options = {

    hardware.cpu.intel.updateMicrocode = mkOption {
      default = false;
      type = types.bool;
      description = ''
        Update the CPU microcode for Intel processors.
      '';
    };

  };


  ###### implementation

  config = mkIf config.hardware.cpu.intel.updateMicrocode {
    hardware.firmware = [ "${pkgs.microcodeIntel}/lib/firmware" ];
    boot.kernelModules = [ "microcode" ];
  };

}