mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-06 01:48:50 +08:00
common/gpu: add option to choose intel-compute-runtime variant
This commit is contained in:
@@ -23,6 +23,15 @@
|
||||
default = true;
|
||||
};
|
||||
|
||||
computeRuntime = lib.mkOption {
|
||||
description = "intel-compute-runtime variant to use";
|
||||
type = lib.types.enum [
|
||||
"default"
|
||||
"legacy"
|
||||
];
|
||||
default = "default";
|
||||
};
|
||||
|
||||
vaapiDriver = lib.mkOption {
|
||||
description = "Intel VAAPI driver to use (use null to use both)";
|
||||
type = lib.types.nullOr (
|
||||
@@ -59,7 +68,11 @@
|
||||
useIntelMediaDriver = cfg.vaapiDriver == "intel-media-driver" || cfg.vaapiDriver == null;
|
||||
intel-media-driver = pkgs.intel-media-driver;
|
||||
intel-media-driver-32 = pkgs.driversi686Linux.intel-media-driver;
|
||||
intel-compute-runtime = pkgs.intel-compute-runtime;
|
||||
intel-compute-runtime =
|
||||
if cfg.computeRuntime == "legacy" then
|
||||
pkgs.intel-compute-runtime-legacy1
|
||||
else
|
||||
pkgs.intel-compute-runtime;
|
||||
vpl-gpu-rt = pkgs.vpl-gpu-rt or pkgs.onevpl-intel-gpu;
|
||||
in
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user