feat: vfio
This commit is contained in:
parent
0b60474af8
commit
1059aa0026
3 changed files with 30 additions and 3 deletions
|
|
@ -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
23
hosts/nullstar/vfio.nix
Normal 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
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue