This commit is contained in:
parent
cc3d5090ac
commit
e02d86dffd
21 changed files with 270 additions and 241 deletions
|
@ -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
|
||||
"";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue