From 52c55b97c45c310ef3a05f99b3bb98c76ab85928 Mon Sep 17 00:00:00 2001
From: Myned <dev@bjork.tech>
Date: Sat, 4 Jan 2025 12:14:35 -0600
Subject: [PATCH] vm: rename option init to blacklist

Signed-off-by: Myned <dev@bjork.tech>
---
 machines/mynix/default.nix     | 2 +-
 options/custom/settings/vm.nix | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/machines/mynix/default.nix b/machines/mynix/default.nix
index 2a00b26..ed61210 100644
--- a/machines/mynix/default.nix
+++ b/machines/mynix/default.nix
@@ -30,10 +30,10 @@
 
       vm.passthrough = {
         enable = true;
+        blacklist = true;
         driver = "amdgpu";
         guest = "myndows";
         id = "1002:73df";
-        init = true;
         intel = true;
         node = "pci_0000_03_00_0";
       };
diff --git a/options/custom/settings/vm.nix b/options/custom/settings/vm.nix
index 73b1b66..5e58640 100644
--- a/options/custom/settings/vm.nix
+++ b/options/custom/settings/vm.nix
@@ -17,10 +17,10 @@ in {
 
     passthrough = {
       enable = mkOption {default = false;};
+      blacklist = mkOption {default = false;};
       driver = mkOption {default = null;}; #?? lspci -k
       guest = mkOption {default = null;}; #?? virsh list --all
       id = mkOption {default = null;}; #?? lspci -nn
-      init = mkOption {default = false;};
       intel = mkOption {default = false;};
       node = mkOption {default = null;}; #?? virsh nodedev-list
     };
@@ -156,7 +156,7 @@ in {
 
     boot = mkIf cfg.passthrough.enable {
       # 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
       kernelParams = mkIf cfg.passthrough.intel ["intel_iommu=on"];