Update and clean up modules
All checks were successful
CI / build (push) Successful in 2m9s

This commit is contained in:
Fabian Hauser 2025-03-03 23:46:19 +02:00
parent cc3d5090ac
commit e02d86dffd
21 changed files with 270 additions and 241 deletions

View file

@ -1,7 +1,6 @@
{ ... }:
{ config, ... }:
{
virtualisation = {
# TODO: This should probably be somewhere else.
docker = {
enable = true;
enableOnBoot = false;
@ -10,9 +9,24 @@
spiceUSBRedirection.enable = true;
};
boot.extraModprobeConfig = ''
options kvm_intel nested=1
options kvm_intel emulate_invalid_guest_state=0
options kvm ignore_msrs=1
'';
boot.extraModprobeConfig =
let
isIntel = config.hardware.cpu.intel.updateMicrocode;
isAmd = config.hardware.cpu.amd.updateMicrocode;
procName =
if isIntel then
"intel"
else if isAmd then
"amd"
else
"";
in
if isIntel || isAmd then
''
options kvm_${procName} nested=1
options kvm_${procName} emulate_invalid_guest_state=0
options kvm ignore_msrs=1
''
else
"";
}