From 680ec362f7d9cae587b5fa9f74be508cf1002ed7 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Fri, 20 Jan 2023 03:31:41 +0000 Subject: [PATCH] rx580 broke, no more vfio --- flake.lock | 18 +++++++++--------- system/starlight/default.nix | 1 - system/starlight/vfio.nix | 34 ---------------------------------- 3 files changed, 9 insertions(+), 44 deletions(-) delete mode 100644 system/starlight/vfio.nix diff --git a/flake.lock b/flake.lock index 1bd32c2..8ade278 100644 --- a/flake.lock +++ b/flake.lock @@ -24,11 +24,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1672322014, - "narHash": "sha256-HEYUb2pxm9SUgqvg8eDpFUl6UPXmd7USNWAew115zL4=", + "lastModified": 1673803274, + "narHash": "sha256-zaJDlHFXewT4KUsidMpRcPE+REymGH1Y3Eoc3Pjv4Xs=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "e2f9c6f7360f3e0f7b0bc2a3e7193a290c5d4c81", + "rev": "7bd6b87b3712e68007823e8dd5c37ee9b114fee3", "type": "github" }, "original": { @@ -39,11 +39,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1672170105, - "narHash": "sha256-RabUtQyG7VCTlWgSu8/nzfF48sWaoO9xAPpRRoVDd18=", + "lastModified": 1673957332, + "narHash": "sha256-njH7Szk1BLVWGMw7IRibgGejSlxXHj9saZHfH20gHdk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "619a61fcfde0cce679708b8644d136e455e84eac", + "rev": "b83e7f5a04a3acc8e92228b0c4bae68933d504eb", "type": "github" }, "original": { @@ -55,11 +55,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1672262501, - "narHash": "sha256-ZNXqX9lwYo1tOFAqrVtKTLcJ2QMKCr3WuIvpN8emp7I=", + "lastModified": 1673796341, + "narHash": "sha256-1kZi9OkukpNmOaPY7S5/+SlCDOuYnP3HkXHvNDyLQcc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e182da8622a354d44c39b3d7a542dc12cd7baa5f", + "rev": "6dccdc458512abce8d19f74195bb20fdb067df50", "type": "github" }, "original": { diff --git a/system/starlight/default.nix b/system/starlight/default.nix index bd6e240..7f87834 100644 --- a/system/starlight/default.nix +++ b/system/starlight/default.nix @@ -5,7 +5,6 @@ ./boot-config.nix ./hardware-configuration.nix ./scripts.nix - ./vfio.nix ../../sets/builder.nix ../../sets/fpga.nix ../../sets/hacking.nix diff --git a/system/starlight/vfio.nix b/system/starlight/vfio.nix deleted file mode 100644 index 0f2fb2f..0000000 --- a/system/starlight/vfio.nix +++ /dev/null @@ -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" ]; - }; -}