remove vfio on starlight

This commit is contained in:
Artemis Tosini 2022-03-29 23:01:33 +00:00
parent 5aa5fb07a6
commit a99ed706b2
Signed by: artemist
GPG key ID: EE5227935FE3FF18
3 changed files with 3 additions and 38 deletions

View file

@ -118,11 +118,11 @@
"wip-pinebook-pro": { "wip-pinebook-pro": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1645472103, "lastModified": 1648577588,
"narHash": "sha256-HIaav1YN+jk0kx8+0Ccov2hsStAIJkB790ENZGDgeU4=", "narHash": "sha256-ur0wxh0hrQH2BiFBxfmm16dJtS+tGzIU9EN3EZpSCpQ=",
"owner": "samueldr", "owner": "samueldr",
"repo": "wip-pinebook-pro", "repo": "wip-pinebook-pro",
"rev": "b7de8c47fec5b96e66c615990b3c15a841a466b9", "rev": "97751d24818f5fdc7abf4418fcfcc31fecfcc18a",
"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/cpu/amd.nix ../../sets/cpu/amd.nix
../../sets/fpga.nix ../../sets/fpga.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" ];
};
}