mirror of
https://github.com/blahai/nyx.git
synced 2025-01-18 19:10:21 +00:00
Global: add IOMMU toggle to virualisation
This commit is contained in:
parent
12ef689a43
commit
233e4fe6a8
1 changed files with 9 additions and 8 deletions
|
@ -1,10 +1,12 @@
|
||||||
{ pkgs, lib, config, ... }: {
|
{ pkgs, lib, config, ... }:
|
||||||
boot = {
|
let enableIOMMU = true;
|
||||||
initrd.kernelModules = lib.mkBefore [
|
in {
|
||||||
"kvm-amd"
|
boot = lib.mkIf enableIOMMU {
|
||||||
"vfio_pci"
|
initrd.kernelModules = lib.mkBefore [
|
||||||
"vfio_iommu_type1"
|
"kvm-amd"
|
||||||
"vfio"
|
"vfio_pci"
|
||||||
|
"vfio_iommu_type1"
|
||||||
|
"vfio"
|
||||||
];
|
];
|
||||||
kernelParams = [
|
kernelParams = [
|
||||||
"amd_iommu=on"
|
"amd_iommu=on"
|
||||||
|
@ -49,5 +51,4 @@
|
||||||
moonlight-qt # for linux vms
|
moonlight-qt # for linux vms
|
||||||
looking-glass-client # for windows vms :husk:
|
looking-glass-client # for windows vms :husk:
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue