Nixos-rebuild build-vm with a GPU

Hi there, I am using nixos-rebuild build-vm as I refactor my repo to use hyprland. I do not want to build against m y machine until I get “far enough”.

Now when I did the rebuild and started the VM, hyprland crashes. I went into the logs, and found:

[CRITICAL] m_sWLRRenderer was NULL! This usually means wlroots could not find a GPU or encountered some issues.
[CRITICAL] Ciritical error throen: wlr_gles2_renderer__create_with_drm_fd() failed!

I have an AMD GPU on my host, and figured I should pass that into the VM. Is there a way to do this when using the rebuild-vm option?

Thank you.

1 Like

ok, so this might not actually be a VM issue. I just tested it on hardware, and I get the same issue. I would still like to know if this is possible, but I will start a new thread to troubleshoot this actual issue.