about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-05 20:23:51 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-05 20:23:51 -0700
commit2c078669e3b526f3c4ea9d383adddedf30535946 (patch)
treea01656329b8d44012b3799eb573b902a62047091 /modules
parentrefactor modules for btrfs, ssd, and fwupd (diff)
downloadworld-2c078669e3b526f3c4ea9d383adddedf30535946.tar.gz
refactor intel related configuration
Diffstat (limited to 'modules')
-rw-r--r--modules/hardware/default.nix2
-rw-r--r--modules/hardware/intel/default.nix13
2 files changed, 14 insertions, 1 deletions
diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix
index 16761db..62208c1 100644
--- a/modules/hardware/default.nix
+++ b/modules/hardware/default.nix
@@ -1,5 +1,5 @@
 { ... }:
 
 {
-  imports = [ ./ssd ./sound ./networking ];
+  imports = [ ./intel ./ssd ./sound ./networking ];
 }
diff --git a/modules/hardware/intel/default.nix b/modules/hardware/intel/default.nix
new file mode 100644
index 0000000..9a53f35
--- /dev/null
+++ b/modules/hardware/intel/default.nix
@@ -0,0 +1,13 @@
+{ config, lib, ... }:
+let cfg = config.my.hardware.intel;
+in {
+  options.my.hardware.intel = with lib; {
+    enable = mkEnableOption "intel related configuration";
+  };
+
+  config = lib.mkIf cfg.enable {
+    # Enable microcode update
+    hardware.cpu.intel.updateMicrocode = true;
+    boot.kernelModules = [ "kvm-intel" ];
+  };
+}