Recent Posts

Windows VM Performance and Usability Tweaks

This post is a retrospective on how I’ve been running Windows VMs on NixOS. It contains a little bit of what and why around how I’ve tweaked my NixOS config, my libvirt configs, and my vm runtimes. It’s more notes for me and assumes familiarity, but feel free to ask about anything in the comments.

I’ve been daily driving linux for a long while, but I’ve kept windows around in a VM for music software and games. I’ve also been thinking more about retiring my windows VM lately.

There’s a fair bit of cost to it. Getting near-native performance in a VM requires a separate video card from your host (or unloading your video card’s kernel modules, unbinding the EFI framebuffer on your host, and maybe ROM flashing depending on your card). Still cheaper than a separate PC, but not cheap, especially if you buy a motherboard that doesn’t cheap out on iommu groups.

Also, when I started exploring this option for running windows proton didn’t exist, and I wasn’t as happy with options for managing wine applications. Running in a VM generally gave much better performance and compatibility than running software through wine.

Over time the difference has shrunk pretty drastically. More DRM has started explicitly disallowing running in a VM. Valve and the open source community around proton have done amazing work. The cost hasn’t shrunk, and issues around power and heat management have only gotten worse as cards have become more power hungry and blower style cards have been phased out.

It’s a balancing act. I definitely will lose some sandbox benefits if I go through with it, but I have also been more interested in hardware acceleration on my host over time. It’s just become a lot less obvious of a decision over time for me.

Anyway though, this is just to collect all of the ideas I’ve incorporated in one place, since many of them don’t fit cleanly in my nix config, and I might deprovision it if I work out a few emulation workflows to a happy place.

flake-parts and dendritic nix

I came across dendritic nix a while ago. I didn’t know enough about flake-parts at the time to really get my head wrapped around it, but I definitely sympathized with the problems people thought it helped solve in the surrounding discussion.

I kept seeing it, and I kept poking at the composing parts, and eventually I got it. I’m currently almost finished migrating my dotfiles to the dendritic pattern. I mostly just need to re-write some of my docs, revise my bootstrap scripts for the new repo structure, and take care of a few flake level stragglers (overlays, templates), but my migration of internal nixos and home-manager modules is complete!

This blog post gives a high level overview flake parts, and the dendritic pattern. It gets into some of the ideas I find the most useful, and also gives an overview of my migration strategy and a retrospective on this change.

Now With Comments

I’ve wanted comments here for a second, but this is a static site (GitHub pages) and I’ve always had some deal breaker turnoff with every embeddable option I’ve looked into. I saw giscus recently and thought it looks pretty nice.

Spencer Balogh

Software engineer. Identity specialist. NixOS enthusiast.