mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-11 23:22:40 +02:00
fix: enable kvm-intel/kvm-amd per host
This commit is contained in:
@@ -19,6 +19,9 @@
|
|||||||
./impermanence.nix
|
./impermanence.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
boot.kernelModules = ["kvm-amd" "kvm-intel"];
|
||||||
|
boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "shoukei"; # Define your hostname.
|
hostName = "shoukei"; # Define your hostname.
|
||||||
# configures the network interface(include wireless) via `nmcli` & `nmtui`
|
# configures the network interface(include wireless) via `nmcli` & `nmtui`
|
||||||
|
|||||||
@@ -23,7 +23,8 @@
|
|||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||||
boot.initrd.kernelModules = [];
|
boot.initrd.kernelModules = [];
|
||||||
boot.kernelModules = ["kvm-intel"];
|
boot.kernelModules = ["kvm-intel"]; # kvm virtualization support
|
||||||
|
boot.extraModprobeConfig = "options kvm_intel nested=1"; # for intel cpu
|
||||||
boot.kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"];
|
boot.kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"];
|
||||||
boot.extraModulePackages = [];
|
boot.extraModulePackages = [];
|
||||||
# clear /tmp on boot to get a stateless /tmp directory.
|
# clear /tmp on boot to get a stateless /tmp directory.
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
"cifs" # mount windows share
|
"cifs" # mount windows share
|
||||||
];
|
];
|
||||||
|
|
||||||
|
boot.kernelModules = ["kvm-amd" "kvm-intel"];
|
||||||
|
boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "aquamarine"; # Define your hostname.
|
hostName = "aquamarine"; # Define your hostname.
|
||||||
wireless.enable = false; # Enables wireless support via wpa_supplicant.
|
wireless.enable = false; # Enables wireless support via wpa_supplicant.
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
"cifs" # mount windows share
|
"cifs" # mount windows share
|
||||||
];
|
];
|
||||||
|
|
||||||
|
boot.kernelModules = ["kvm-amd" "kvm-intel"];
|
||||||
|
boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "kana"; # Define your hostname.
|
hostName = "kana"; # Define your hostname.
|
||||||
wireless.enable = false; # Enables wireless support via wpa_supplicant.
|
wireless.enable = false; # Enables wireless support via wpa_supplicant.
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
"cifs" # mount windows share
|
"cifs" # mount windows share
|
||||||
];
|
];
|
||||||
|
|
||||||
|
boot.kernelModules = ["kvm-amd" "kvm-intel"];
|
||||||
|
boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "ruby"; # Define your hostname.
|
hostName = "ruby"; # Define your hostname.
|
||||||
wireless.enable = false; # Enables wireless support via wpa_supplicant.
|
wireless.enable = false; # Enables wireless support via wpa_supplicant.
|
||||||
|
|||||||
@@ -5,10 +5,18 @@
|
|||||||
#
|
#
|
||||||
###################################################################################
|
###################################################################################
|
||||||
|
|
||||||
boot.kernelModules = ["kvm-amd" "kvm-intel" "vfio-pci"];
|
|
||||||
# Enable nested virsualization, required by security containers and nested vm.
|
# Enable nested virsualization, required by security containers and nested vm.
|
||||||
boot.extraModprobeConfig = "options kvm_intel nested=1"; # for intel cpu
|
# This should be set per host in /hosts, not here.
|
||||||
|
#
|
||||||
|
## For AMD CPU, add "kvm-amd" to kernelModules.
|
||||||
|
# boot.kernelModules = ["kvm-amd" "kvm-intel"];
|
||||||
# boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu
|
# boot.extraModprobeConfig = "options kvm_amd nested=1"; # for amd cpu
|
||||||
|
#
|
||||||
|
## For Intel CPU, add "kvm-intel" to kernelModules.
|
||||||
|
# boot.kernelModules = ["kvm-intel"];
|
||||||
|
# boot.extraModprobeConfig = "options kvm_intel nested=1"; # for intel cpu
|
||||||
|
|
||||||
|
boot.kernelModules = ["vfio-pci"];
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
libvirtd = {
|
libvirtd = {
|
||||||
|
|||||||
Reference in New Issue
Block a user