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