2024-06-24 15:38:28 +00:00
|
|
|
# Enables Intel GPU support.
|
2024-10-05 17:03:44 +00:00
|
|
|
# https://wiki.nixos.org/wiki/Intel_Graphics
|
|
|
|
# https://nixos.org/manual/nixos/stable/#sec-x11--graphics-cards-intel
|
2024-06-24 15:38:28 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
cfg = config.aux.system.gpu.intel;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
2024-09-08 15:58:56 +00:00
|
|
|
aux.system.gpu.intel.enable = lib.mkEnableOption "Enables Intel GPU support.";
|
2024-06-24 15:38:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
2024-10-05 17:03:44 +00:00
|
|
|
services.xserver.videoDrivers = [ "intel" ];
|
2024-06-24 15:38:28 +00:00
|
|
|
|
2024-10-05 17:03:44 +00:00
|
|
|
hardware.graphics = {
|
|
|
|
enable = true;
|
2024-10-24 21:03:02 +00:00
|
|
|
extraPackages = with pkgs; [
|
|
|
|
intel-media-driver
|
2024-11-23 18:09:24 +00:00
|
|
|
vpl-gpu-rt
|
2024-09-08 15:58:56 +00:00
|
|
|
];
|
|
|
|
extraPackages32 = with pkgs.driversi686Linux; [
|
|
|
|
intel-media-driver
|
2024-11-23 18:09:24 +00:00
|
|
|
vpl-gpu-rt
|
2024-09-08 15:58:56 +00:00
|
|
|
];
|
|
|
|
};
|
2024-06-24 15:38:28 +00:00
|
|
|
};
|
|
|
|
}
|