This commit is contained in:
Peder Bergebakken Sundt 2024-10-19 04:05:37 +02:00
parent 4cc421ec43
commit a612898422
4 changed files with 37 additions and 0 deletions

20
profiles/vm/libvirtd.nix Normal file
View File

@ -0,0 +1,20 @@
{ pkgs, ... }:
# https://wiki.nixos.org/wiki/Virt-manager
{
programs.virt-manager.enable = true; # can be x-forwarded
virtualisation.libvirtd.enable = true;
/* virtualisation.libvirtd.onShutdown = "shutdown"; # default is "suspend" */
/* virtualisation.libvirtd.shutdownTimeout = 300; */
#networking.firewall.trustedInterfaces = [
# "virbr0"
# "virbr0-nic"
#];
virtualisation.libvirtd.qemu.package = pkgs.qemu_kvm;
# Allows libvirtd to use swtpm to create an emulated TPM.
/* virtualisation.libvirtd.qemu.swtpm.enable = true; */
}

10
profiles/vm/vmware.nix Normal file
View File

@ -0,0 +1,10 @@
{
virtualisation.vmware.host.enable = true;
#environment.persistence."/nix/persistent" = {
# directories = [ "/etc/vmware" ];
#};
# VMWare fix
#boot.kernelParams = [ "ibt=off" ];
}

6
profiles/vm/xen.nix Normal file
View File

@ -0,0 +1,6 @@
{ pkgs, ... }:
{
# This requires a reboot into a Xen kernel to take effect.
virtualisation.xen.enable = true;
system.nixos.tags = [ "with-xen" ]; # just cosmetic
}

View File

@ -44,6 +44,7 @@
"users" # backward compat
"keys" # access tokens in nix.conf
#"nix-community-builder"
"libvirtd"
"networkmanager"
"audio"
"sound"