diff --git a/global/system-configuration.nix b/global/system-configuration.nix index 6f37b50..c99b7d3 100644 --- a/global/system-configuration.nix +++ b/global/system-configuration.nix @@ -1,4 +1,13 @@ -{ pkgs, lib, ... }: { +{ pkgs, lib, ... }: +let + intel-driver = ( + if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then + pkgs.vaapiIntel + else + pkgs.intel-vaapi-driver + ); +in +{ sound.enable = true; networking.networkmanager.enable = true; time.timeZone = "Asia/Shanghai"; @@ -8,17 +17,11 @@ hardware = { opengl = { enable = true; - extraPackages = with pkgs; [ - mesa.drivers - libvdpau-va-gl - vaapiVdpau - - ( - if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then - vaapiIntel - else - intel-vaapi-driver - ) + extraPackages = [ + pkgs.mesa.drivers + pkgs.libvdpau-va-gl + pkgs.vaapiVdpau + intel-driver ]; }; };