mirror of
https://github.com/SuperSandro2000/nixos-modules.git
synced 2024-06-09 17:54:06 +02:00
25 lines
805 B
Nix
25 lines
805 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
options.hardware = {
|
|
intelGPU = lib.mkEnableOption "" // { description = "Whether to add drivers for intel hardware acceleration."; };
|
|
};
|
|
|
|
config = {
|
|
hardware.opengl = {
|
|
extraPackages = with pkgs; lib.mkIf config.hardware.intelGPU [
|
|
intel-compute-runtime # OpenCL library for iGPU
|
|
intel-ocl # OpenCL library for CPU
|
|
# video encoding/decoding hardware acceleration
|
|
intel-media-driver # broadwell or newer
|
|
vaapiIntel # older hardware like haswell
|
|
];
|
|
extraPackages32 = with pkgs.pkgsi686Linux; lib.mkIf config.hardware.intelGPU [
|
|
# video encoding/decoding hardware acceleration
|
|
intel-media-driver # broadwell or newer
|
|
vaapiIntel # older hardware like haswell
|
|
];
|
|
};
|
|
};
|
|
}
|