{ config, pkgs, ... }:
{
  # See `NixOS.md` at section "Graphic drivers"

  hardware.opengl = {
    enable = true;

    # Whether to enable accelerated OpenGL rendering through the Direct Rendering Interface (DRI).
    # The Direct Rendering Infrastructure (DRI) is the framework comprising the modern Linux graphics [...]. The main use of DRI is to provide hardware acceleration for the Mesa implementation of OpenGL.
    driSupport = true;
    driSupport32Bit = true;

    extraPackages = [
      # AMD Open Source Driver For Vulkan
      pkgs.amdvlk

      # Encoding/decoding acceleration
      #
      # VDPAU driver with OpenGL/VAAPI backend
      pkgs.libvdpau-va-gl
      # VDPAU driver for the VAAPI library
      pkgs.vaapiVdpau

      # OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms.
      #
      # OpenCL ICD definition for AMD GPUs using the ROCm stack.
      pkgs.rocm-opencl-icd
      # OpenCL runtime for AMD GPUs, part of the ROCm stack.
      pkgs.rocm-opencl-runtime

      # Xorg driver for AMD Radeon GPUs using the amdgpu kernel driver
      # https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu
      pkgs.xorg.xf86videoamdgpu
    ];
  };
}
