From 1d0b3cf27b8b57a6ccc758f111b863d87bab7851 Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Fri, 23 Jun 2023 07:38:13 -0400 Subject: [PATCH] treewide: avoid alias usage for intel-vaapi-driver based on nixos version --- common/gpu/intel/default.nix | 2 +- gpd/pocket-3/default.nix | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix index 31db8b4..ed76057 100644 --- a/common/gpu/intel/default.nix +++ b/common/gpu/intel/default.nix @@ -8,7 +8,7 @@ }; hardware.opengl.extraPackages = with pkgs; [ - vaapiIntel + (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) libvdpau-va-gl intel-media-driver ]; diff --git a/gpd/pocket-3/default.nix b/gpd/pocket-3/default.nix index 64417b9..634e36b 100644 --- a/gpd/pocket-3/default.nix +++ b/gpd/pocket-3/default.nix @@ -14,7 +14,10 @@ in # GPU is an Intel Iris Xe, on a “TigerLake” mobile CPU boot.initrd.kernelModules = [ "i915" ]; # Early loading so the passphrase prompt appears on external displays services.xserver.videoDrivers = [ "intel" ]; - hardware.opengl.extraPackages = with pkgs; [ intel-media-driver vaapiIntel ]; + hardware.opengl.extraPackages = with pkgs; [ + intel-media-driver + (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) + ]; boot.kernelParams = [ # S3 suspend is broken as of Sept. 2022 (screen does not come back properly), use S2