~ / OpenCL on Intel UHD620 (NixOS)

September 19, 2025

I was somewhat confounded on how to get OpenCL to work on my T480 with NixOS. I needed it for my darktable workflow. As without OpenCL it was unnaceptably slow. My initial thoughts was that intel-compute-runtime would solve it. Turns out the T480 is considered legacy, so use the intel-compute-runtime-legacy1 package instead.

Also I am unsure whether its a bug or not but having packages declared in both hardware.graphics.extraPackages as well as in systemPackages. I am on NixOS 25.05.

  hardware.graphics = {
    enable = true;
    enable32Bit = true;
    extraPackages = with pkgs; [ 
      vaapiIntel
      mesa
      intel-media-driver
      intel-compute-runtime-legacy1
      intel-graphics-compiler
      libva
      libvdpau-va-gl
      vulkan-loader
      vulkan-tools
      level-zero
      intel-ocl
      clinfo
    ];
  };
  hardware.cpu.intel.updateMicrocode = true;