I’m in the process of setting up GPU passthrough on NixOS, but my hardware requires me to use linux-vfio with which I request some help installing. On Arch Linux, this was available on the AUR, but I’m a bit lost on how to port it to NixOS.
Thinking I only needed add-acs-overrides.patch
from the AUR page above, I blindly tried the following after searching how one would apply a patch.
boot.kernelPackages = pkgs.linuxPackages_4_14;
nixpkgs.config.packageOverrides = pkgs: {
linux_4_14 = pkgs.linux_4_14.override {
kernelPatches = pkgs.linux_4_14.kernelPatches ++ [
{
name = "acs-overrides";
patch = pkgs.fetchurl {
url = "https://aur.archlinux.org/cgit/aur.git/plain/add-acs-overrides.patch?h=linux-vfio";
sha256 = "abe269c6596b54a412bd8415472153f419026d4f367fa3ee1ebc8693ac66915d";
};
}
];
};
};
But I’m defenitely doing something wrong since it did not work.
Cheers.