NixOS as Hypervisor

This has been asked before ~ a year ago; I’m wondering if there’s anything recent that applies:

I have a NixOS where 1) I’m running Windows in KVM with libvirt and GPU pass-through, and 2) doing some other random development. I’d like to move my development to a VM, and possibly set up other VMs for testing, and I’d prefer a nix-based declarative syntax for managing those VMs. Is there already a way to do that with libvirt? I don’t see a way to set up GPU pass-through with vpsAdminOS.

1 Like

I saw a while back, a project called microvm GitHub - astro/microvm.nix: NixOS MicroVMs mentioned in Nixos Weekly: #05 - NixOS Weekly

I haven’t tried it myself, and it seems like it’s flakes only so not sure if that works for you, but it mostly fits your description. Hope it helps or maybe leads you to something more suitable for your situation.

2 Likes