mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 23:31:54 -05:00
42 lines
1,010 B
Nix
42 lines
1,010 B
Nix
|
{
|
||
|
config,
|
||
|
lib,
|
||
|
pkgs,
|
||
|
...
|
||
|
}: {
|
||
|
config = lib.mkIf config.ar.hardware.gpu.intel {
|
||
|
boot.initrd.kernelModules = ["i915"];
|
||
|
|
||
|
environment.sessionVariables = {
|
||
|
LIBVA_DRIVER_NAME = "iHD";
|
||
|
VDPAU_DRIVER = "va_gl";
|
||
|
};
|
||
|
|
||
|
hardware = {
|
||
|
enableAllFirmware = true;
|
||
|
|
||
|
opengl = {
|
||
|
enable = true;
|
||
|
driSupport = true;
|
||
|
driSupport32Bit = true;
|
||
|
|
||
|
extraPackages = with pkgs; [
|
||
|
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||
|
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||
|
libvdpau-va-gl
|
||
|
];
|
||
|
|
||
|
extraPackages32 = with pkgs.driversi686Linux; [
|
||
|
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||
|
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||
|
libvdpau-va-gl
|
||
|
];
|
||
|
};
|
||
|
|
||
|
sensor.iio.enable = true; # Enable auto-rotate and tablet mode.
|
||
|
};
|
||
|
|
||
|
services.xserver.videoDrivers = ["modesetting"];
|
||
|
};
|
||
|
}
|