diff --git a/profiles/hardware/amdgpu.nix b/profiles/hardware/gpu/amdgpu.nix similarity index 57% rename from profiles/hardware/amdgpu.nix rename to profiles/hardware/gpu/amdgpu.nix index 6895a9b..0b9d36a 100644 --- a/profiles/hardware/amdgpu.nix +++ b/profiles/hardware/gpu/amdgpu.nix @@ -1,8 +1,7 @@ { ... }: { + imports = [ ./common.nix ]; + boot.initrd.kernelModules = [ "amdgpu" ]; services.xserver.videoDrivers = [ "amdgpu" ]; - - hardware.opengl.driSupport = true; - hardware.opengl.driSupport32Bit = true; } diff --git a/profiles/hardware/gpu/common.nix b/profiles/hardware/gpu/common.nix new file mode 100644 index 0000000..d71e4b1 --- /dev/null +++ b/profiles/hardware/gpu/common.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: { + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + + extraPackages = with pkgs; [ + vaapiVdpau + libvdpau-va-gl + ]; + }; +} diff --git a/profiles/hardware/gpu/intel.nix b/profiles/hardware/gpu/intel.nix new file mode 100644 index 0000000..e3b340a --- /dev/null +++ b/profiles/hardware/gpu/intel.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: { + imports = [ ./common.nix ]; + + hardware.opengl.extraPackages = with pkgs; [ + intel-media-driver + vaapiIntel + ]; +} diff --git a/profiles/hardware/nvidia.nix b/profiles/hardware/gpu/nvidia.nix similarity index 57% rename from profiles/hardware/nvidia.nix rename to profiles/hardware/gpu/nvidia.nix index bd49e06..b02a6aa 100644 --- a/profiles/hardware/nvidia.nix +++ b/profiles/hardware/gpu/nvidia.nix @@ -1,7 +1,7 @@ { ... }: { + imports = [ ./common.nix ]; + services.xserver.videoDrivers = [ "nvidia" ]; hardware.nvidia.modesetting.enable = true; - hardware.opengl.driSupport = true; - hardware.opengl.driSupport32Bit = true; } diff --git a/profiles/hardware/intel.nix b/profiles/hardware/intel.nix deleted file mode 100644 index c915eb0..0000000 --- a/profiles/hardware/intel.nix +++ /dev/null @@ -1 +0,0 @@ -{ ... }: { }