virtualisation: restructure kvm module options and enable libvirt by default
This commit is contained in:
@@ -13,5 +13,5 @@
|
||||
|
||||
[
|
||||
./docker.nix
|
||||
# ./qemu.nix
|
||||
./qemu.nix
|
||||
]
|
||||
|
||||
12
modules/desktop/virtualisation/kvm-amd.nix
Normal file
12
modules/desktop/virtualisation/kvm-amd.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# KVM module options amd
|
||||
#
|
||||
|
||||
{ config, pkgs, user, ... }:
|
||||
|
||||
{ # Add libvirtd and kvm to userGroups
|
||||
boot.extraModprobeConfig = ''
|
||||
options kvm_amd nested=0 avic=1 npt=1
|
||||
''; # Needed to run OSX-KVM
|
||||
}
|
||||
|
||||
13
modules/desktop/virtualisation/kvm-intel.nix
Normal file
13
modules/desktop/virtualisation/kvm-intel.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# KVM module options intel
|
||||
#
|
||||
|
||||
{ config, pkgs, user, ... }:
|
||||
|
||||
{ # Add libvirtd and kvm to userGroups
|
||||
boot.extraModprobeConfig = ''
|
||||
options kvm_intel nested=1
|
||||
options kvm_intel emulate_invalid_guest_state=0
|
||||
options kvm ignore_nsrs=1
|
||||
''; # Needed to run OSX-KVM
|
||||
}
|
||||
@@ -5,12 +5,6 @@
|
||||
{ config, pkgs, user, ... }:
|
||||
|
||||
{ # Add libvirtd and kvm to userGroups
|
||||
boot.extraModprobeConfig = ''
|
||||
options kvm_intel nested=1
|
||||
options kvm_intel emulate_invalid_guest_state=0
|
||||
options kvm ignore_nsrs=1
|
||||
''; # Needed to run OSX-KVM
|
||||
|
||||
users.groups.libvirtd.members = [ "root" "${user}" ];
|
||||
|
||||
virtualisation = {
|
||||
|
||||
Reference in New Issue
Block a user