From 84fcf2693228f2cf2591d57f7ffad3ba54dbd9db Mon Sep 17 00:00:00 2001 From: yaroslav Date: Tue, 10 Jun 2025 22:41:58 +0300 Subject: [PATCH] added iommu support for Quark --- flake.nix | 1 + hosts/Aphelion/hardware-Aphelion.nix | 1 + hosts/Quark/Quark-hardware.nix | 6 +++++- hosts/Ratchet/hardware-Ratchet.nix | 1 + hosts/generic/virtualization.nix | 2 +- 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 7c99296..eb737db 100644 --- a/flake.nix +++ b/flake.nix @@ -91,6 +91,7 @@ ./hosts/generic/configuration_generic.nix ./hosts/generic/users.nix ./hosts/Quark/Quark-hardware.nix + ./hosts/generic/virtualization.nix # hm-stable.nixosModules.home-manager { # home-manager.useUserPackages = true; # home-manager.users.yaroslav = { diff --git a/hosts/Aphelion/hardware-Aphelion.nix b/hosts/Aphelion/hardware-Aphelion.nix index cb5cc97..6bff5ba 100644 --- a/hosts/Aphelion/hardware-Aphelion.nix +++ b/hosts/Aphelion/hardware-Aphelion.nix @@ -13,6 +13,7 @@ boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; boot.kernelPackages = pkgs.linuxPackages_zen; + boot.extraModprobeConfig = "options kvm_amd nested=1"; fileSystems."/" = { #device = "/dev/disk/by-uuid/3126fadd-b793-4110-bcb7-577b7978cba2"; diff --git a/hosts/Quark/Quark-hardware.nix b/hosts/Quark/Quark-hardware.nix index 740a72d..dfa0fc7 100644 --- a/hosts/Quark/Quark-hardware.nix +++ b/hosts/Quark/Quark-hardware.nix @@ -10,9 +10,13 @@ boot.initrd.supportedFilesystems = [ "nfs" "nfsv4" "overlay" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" "nfs" "nfsv4" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; swapDevices = [ ]; + boot.extraModprobeConfig = "options kvm_intel nested=1"; + boot.kernelParams = [ + "intel_iommu=on" + ]; fileSystems."/" = { device = "/dev/sda4"; diff --git a/hosts/Ratchet/hardware-Ratchet.nix b/hosts/Ratchet/hardware-Ratchet.nix index 19d27f7..7714583 100644 --- a/hosts/Ratchet/hardware-Ratchet.nix +++ b/hosts/Ratchet/hardware-Ratchet.nix @@ -12,6 +12,7 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; + boot.extraModprobeConfig = "options kvm_amd nested=1"; fileSystems."/" = { device = "none"; diff --git a/hosts/generic/virtualization.nix b/hosts/generic/virtualization.nix index 7655a15..1739d00 100644 --- a/hosts/generic/virtualization.nix +++ b/hosts/generic/virtualization.nix @@ -24,5 +24,5 @@ }; }; }; - boot.extraModprobeConfig = "options kvm_amd nested=1"; + }