deduplicate driver code

This commit is contained in:
Vinzenz Schroeter 2024-02-23 22:30:43 +01:00
parent 6911d314f4
commit 648c853e7c

View file

@ -17,7 +17,7 @@ in {
boot.kernelModules = ["kvm-intel"]; boot.kernelModules = ["kvm-intel"];
hardware.cpu.intel.updateMicrocode = true; hardware.cpu.intel.updateMicrocode = true;
}) })
(lib.mkIf cfg.iGpu { (lib.mkIf (cfg.iGpu || cfg.xe) {
hardware.opengl = { hardware.opengl = {
extraPackages = with pkgs; [ extraPackages = with pkgs; [
intel-media-driver intel-media-driver
@ -36,18 +36,5 @@ in {
nvtop-intel nvtop-intel
]; ];
}) })
(lib.mkIf cfg.xe {
hardware.opengl = {
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
environment.systemPackages = with pkgs; [
nvtop-intel
];
})
]; ];
} }