vm: rename option init to blacklist
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
54817e4d70
commit
52c55b97c4
2 changed files with 3 additions and 3 deletions
|
@ -30,10 +30,10 @@
|
||||||
|
|
||||||
vm.passthrough = {
|
vm.passthrough = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
blacklist = true;
|
||||||
driver = "amdgpu";
|
driver = "amdgpu";
|
||||||
guest = "myndows";
|
guest = "myndows";
|
||||||
id = "1002:73df";
|
id = "1002:73df";
|
||||||
init = true;
|
|
||||||
intel = true;
|
intel = true;
|
||||||
node = "pci_0000_03_00_0";
|
node = "pci_0000_03_00_0";
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,10 +17,10 @@ in {
|
||||||
|
|
||||||
passthrough = {
|
passthrough = {
|
||||||
enable = mkOption {default = false;};
|
enable = mkOption {default = false;};
|
||||||
|
blacklist = mkOption {default = false;};
|
||||||
driver = mkOption {default = null;}; #?? lspci -k
|
driver = mkOption {default = null;}; #?? lspci -k
|
||||||
guest = mkOption {default = null;}; #?? virsh list --all
|
guest = mkOption {default = null;}; #?? virsh list --all
|
||||||
id = mkOption {default = null;}; #?? lspci -nn
|
id = mkOption {default = null;}; #?? lspci -nn
|
||||||
init = mkOption {default = false;};
|
|
||||||
intel = mkOption {default = false;};
|
intel = mkOption {default = false;};
|
||||||
node = mkOption {default = null;}; #?? virsh nodedev-list
|
node = mkOption {default = null;}; #?? virsh nodedev-list
|
||||||
};
|
};
|
||||||
|
@ -156,7 +156,7 @@ in {
|
||||||
|
|
||||||
boot = mkIf cfg.passthrough.enable {
|
boot = mkIf cfg.passthrough.enable {
|
||||||
# https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Isolating_the_GPU
|
# https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Isolating_the_GPU
|
||||||
blacklistedKernelModules = mkIf cfg.passthrough.init [cfg.passthrough.driver];
|
blacklistedKernelModules = mkIf cfg.passthrough.blacklist [cfg.passthrough.driver];
|
||||||
|
|
||||||
# https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Enabling_IOMMU
|
# https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Enabling_IOMMU
|
||||||
kernelParams = mkIf cfg.passthrough.intel ["intel_iommu=on"];
|
kernelParams = mkIf cfg.passthrough.intel ["intel_iommu=on"];
|
||||||
|
|
Loading…
Add table
Reference in a new issue