File tree Expand file tree Collapse file tree 2 files changed +39
-3
lines changed
system/machines/silvio-pc Expand file tree Collapse file tree 2 files changed +39
-3
lines changed Original file line number Diff line number Diff line change 38
38
rec {
39
39
nixosConfigurations = let
40
40
lib = ( import ./system/lib.nix ) { inherit nixpkgs ; } ;
41
+ nur-no-pkgs = import nur {
42
+ nurpkgs = import nixpkgs { system = "x86_64-linux" ; } ;
43
+ } ;
41
44
in
42
45
lib . mkHosts {
43
46
modules = [
44
47
inputs . disko . nixosModules . disko
45
48
inputs . impermanence . nixosModules . impermanence
46
49
inputs . sops-nix . nixosModules . sops
50
+ nur-no-pkgs . repos . crtified . modules . vfio
51
+ nur-no-pkgs . repos . crtified . modules . libvirt
47
52
] ;
48
53
machinedir = ./system/machines ;
49
54
} ;
Original file line number Diff line number Diff line change 4
4
libvirtUsers = [ "silvio" "sa" ] ;
5
5
} ;
6
6
7
- # Blacklist nvidia because it's annoying.
8
- # TODO: pcie passthrough using ie. https://github.com/CRTified/nur-packages
9
- boot . blacklistedKernelModules = [ "nvidia" "nouveau" ] ;
7
+ virtualisation . vfio = {
8
+ enable = true ;
9
+ IOMMUType = "intel" ;
10
+ devices = [
11
+ "10de:1380" # NVIDIA Corporation GM107 [GeForce GTX 750 Ti]
12
+ "10de:0fbc" # NVIDIA Corporation GM107 High Definition Audio Controller [GeForce 940MX]
13
+ ] ;
14
+ blacklistNvidia = true ;
15
+ applyACSpatch = false ; # TODO fix upstream
16
+ } ;
17
+
18
+ # workaround for dysfunctional option upstream
19
+ boot . kernelParams = [
20
+ "pcie_acs_override=downstream,multifunction"
21
+ "pci=nomsi"
22
+ ] ;
23
+ boot . kernelPatches = [
24
+ {
25
+ name = "add-acs-overrides" ;
26
+ patch = pkgs . fetchurl {
27
+ name = "add-acs-overrides.patch" ;
28
+ url = "https://aur.archlinux.org/cgit/aur.git/plain/1001-6.6.7-add-acs-overrides.patch?h=linux-vfio&id=3d7255075f74ae27d4bddfc9c18f8e434e8255d3" ;
29
+ sha256 = "sha256-80KYa9J5gMlslSsN2BA9PiGpQth/GN8TCPqzcOIAEPs=" ;
30
+ } ;
31
+ }
32
+ {
33
+ name = "i915-vga-arbiter" ;
34
+ patch = pkgs . fetchurl {
35
+ name = "i915-vga-arbiter.patch" ;
36
+ url = "https://aur.archlinux.org/cgit/aur.git/plain/1002-6.6.7-i915-vga-arbiter.patch?h=linux-vfio&id=3d7255075f74ae27d4bddfc9c18f8e434e8255d3" ;
37
+ sha256 = "sha256-KjxzLU1hpjHJiyo+Svsfpdv4vlxDUZsqWdDmUXDJ2Ns=" ;
38
+ } ;
39
+ }
40
+ ] ;
10
41
}
You can’t perform that action at this time.
0 commit comments