rx580 broke, no more vfio

This commit is contained in:
Artemis Tosini 2023-01-20 03:31:41 +00:00
parent 9b55cf3095
commit 680ec362f7
Signed by: artemist
GPG key ID: EE5227935FE3FF18
3 changed files with 9 additions and 44 deletions

View file

@ -24,11 +24,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1672322014, "lastModified": 1673803274,
"narHash": "sha256-HEYUb2pxm9SUgqvg8eDpFUl6UPXmd7USNWAew115zL4=", "narHash": "sha256-zaJDlHFXewT4KUsidMpRcPE+REymGH1Y3Eoc3Pjv4Xs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "e2f9c6f7360f3e0f7b0bc2a3e7193a290c5d4c81", "rev": "7bd6b87b3712e68007823e8dd5c37ee9b114fee3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -39,11 +39,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1672170105, "lastModified": 1673957332,
"narHash": "sha256-RabUtQyG7VCTlWgSu8/nzfF48sWaoO9xAPpRRoVDd18=", "narHash": "sha256-njH7Szk1BLVWGMw7IRibgGejSlxXHj9saZHfH20gHdk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "619a61fcfde0cce679708b8644d136e455e84eac", "rev": "b83e7f5a04a3acc8e92228b0c4bae68933d504eb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -55,11 +55,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1672262501, "lastModified": 1673796341,
"narHash": "sha256-ZNXqX9lwYo1tOFAqrVtKTLcJ2QMKCr3WuIvpN8emp7I=", "narHash": "sha256-1kZi9OkukpNmOaPY7S5/+SlCDOuYnP3HkXHvNDyLQcc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e182da8622a354d44c39b3d7a542dc12cd7baa5f", "rev": "6dccdc458512abce8d19f74195bb20fdb067df50",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -5,7 +5,6 @@
./boot-config.nix ./boot-config.nix
./hardware-configuration.nix ./hardware-configuration.nix
./scripts.nix ./scripts.nix
./vfio.nix
../../sets/builder.nix ../../sets/builder.nix
../../sets/fpga.nix ../../sets/fpga.nix
../../sets/hacking.nix ../../sets/hacking.nix

View file

@ -1,34 +0,0 @@
{ pkgs, pkgs-unstable, ... }:
# based on https://alexbakker.me/post/nixos-pci-passthrough-qemu-vfio.html
{
environment.systemPackages = [
pkgs-unstable.looking-glass-client
pkgs.scream
];
boot.initrd = {
availableKernelModules = [ "amdgpu" "vfio-pci" ];
preDeviceCommands = ''
echo vfio-pci > /sys/bus/pci/devices/0000:0b:00.0/driver_override
echo vfio-pci > /sys/bus/pci/devices/0000:0b:00.1/driver_override
modprobe -i vfio-pci
'';
};
systemd.tmpfiles.rules = [
"f /dev/shm/scream 0660 artemis qemu-libvirtd -"
"f /dev/shm/looking-glass 0660 artemis qemu-libvirtd -"
];
systemd.user.services.scream-ivshmem = {
enable = true;
description = "Scream IVSHMEM";
serviceConfig = {
ExecStart = "${pkgs.scream}/bin/scream -m /dev/shm/scream -o pulse";
Restart = "always";
};
wantedBy = [ "multi-user.target" ];
requires = [ "pulseaudio.service" ];
};
}