nixos-configuration/modules/hardware/intel.nix
Vinzenz Schroeter 246eca567a update to 24.05
2024-06-21 17:13:58 +02:00

41 lines
879 B
Nix

{
lib,
config,
pkgs,
...
}: let
cfg = config.my.hardware.intel;
in {
options.my.hardware.intel = {
cpu = lib.mkEnableOption "intel cpu";
iGpu = lib.mkEnableOption "intel integrated gpu";
xe = lib.mkEnableOption "intel xe gpu";
};
config = lib.mkMerge [
(lib.mkIf cfg.cpu {
boot.kernelModules = ["kvm-intel"];
hardware.cpu.intel.updateMicrocode = true;
})
(lib.mkIf (cfg.iGpu || cfg.xe) {
hardware.opengl = {
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
extraPackages32 = with pkgs.pkgsi686Linux; [
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
environment.systemPackages = with pkgs; [
nvtopPackages.intel
];
})
];
}