From 1bc0a8f8c5bc38314d15b9b2774cf9694a5192a3 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Fri, 15 Mar 2024 16:13:02 -0500 Subject: [PATCH] Enable QEMU/KVM/libvirt --- nixos/gandalf/configuration.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/nixos/gandalf/configuration.nix b/nixos/gandalf/configuration.nix index 9524438..ee94a86 100644 --- a/nixos/gandalf/configuration.nix +++ b/nixos/gandalf/configuration.nix @@ -132,10 +132,11 @@ }; - # Xen-orchestra + # Podman Containers virtualisation.oci-containers = { backend = "podman"; containers ={ + # Xen-orchestra container xen-orchestra = { image = "docker.io/ronivay/xen-orchestra:5.136.0"; ports = [ "80:80" ]; @@ -174,6 +175,17 @@ }; }; + # Enable QEMU/KVM/libvirt + virtualisation.libvirt.enable = true; + virtualisation.libvirtd = { + enable = true; + qemu = { + package = pkgs.qemu_kvm; + ovmf.enable = true; + ovmf.packages = [pkgs.OVMFFull.fd]; + }; + }; + # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];