Elgato 4K60 Capture Card on NixOS

Posted on Aug 6, 2025

This guide will allow you to use your Elgato 4K60 Capture Card on NixOS through a virtualised copy of Windows.

Prerequisites

Installation

Install the required packages for Spice, VirtIO, and Virtual Machine Manager. In the following configuration block I use home-manager to install these packages for me.

home.packages = with pkgs; [
  adwaita-icon-theme
  spice
  spice-gtk
  spice-protocol
  virt-manager
  virt-viewer
  win-spice
  win-virtio
];

Virtualisation is then enabled in the following configuration as per NixOS’s wiki’s recommendations.

Replace ${yourUsernameHere} with your username.

users.users.${yourUsernameHere}.extraGroups = [ "libvirtd" ];

virtualisation = {
  libvirtd = {
    enable = true;
    qemu = {
      swtpm.enable = true;
      ovmf.enable = true;
      ovmf.packages = with pkgs; [ OVMFFull.fd ];
      vhostUserPackages = with pkgs; [ virtiofsd ];
    };
  };
  spiceUSBRedirection.enable = true;
};

services.spice-vdagentd.enable = true;

Finding your Device ID

Obtain the device ID of your capture card using lspci -nn. It will show up as YUAN High-Tech Development Co., Ltd. Device. Make a note of the value at the end, usually something similar to 1234:5678. The output of lspci -nn showing my device ID as being 12ab:0710.

Add the following to your NixOS settings then reboot.

boot.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" ];

# Replace `12ab:0710` here with the value you got earlier.
boot.kernelParams = [ "intel_iommu=on" "iommu=pt" "vfio-pci.ids=12ab:0710"];

Running the Windows VM

  1. Make a new Windows VM using virt-manager.
  2. Add your PCI device by clicking into Add Hardware > PCI Host Device and finding YUAN High-Tech Development Co., Ltd.. The last entry shows the relevant host device. Double click it to add it.
  3. Set up Windows as usual.
  4. Install Elgato’s 4K Capture Utility software.

From here you should see the input from your capture card. If it doesn’t show up, try unplugging/replugging the HDMI cables on the capture card.