feat: vfio

This commit is contained in:
Xory 2026-03-06 16:48:14 +02:00
parent 0b60474af8
commit 1059aa0026
3 changed files with 30 additions and 3 deletions

View file

@ -8,6 +8,10 @@
(inputs.nixos-hardware.nixosModules.framework-16-7040-amd)
];
specialisation."VFIO".configuration = {
imports = [ ./vfio.nix ];
};
services.fwupd.enable = true;
networking.hostName = "nullstar";

23
hosts/nullstar/vfio.nix Normal file
View file

@ -0,0 +1,23 @@
{ config, pkgs, ... }:
{
boot.kernelParams = [
"amd_iommu=on"
"iommu=pt"
"vfio-pci.ids=1002:7480,1002:ab30"
];
boot.initrd.kernelModules = [
"vfio"
"vfio_pci"
"vfio_iommu_type1"
];
systemd.tmpfiles.rules = [
"f /dev/shm/looking-glass 0660 xory qemu-libvirtd -"
];
environment.systemPackages = with pkgs; [
looking-glass-client
];
}