For all of my personal machines, I use NixOS (both hardware and in cloud machines). But for work, we have a soft-MacOS mandate. On that m1 macbook pro, I run nix-darwin for the mac specific settings I want, and packages that I run in macos, but everything else in a NixOS VM similar to mitchellh/nixos-config.
I use UTM (a nice wrapper around qemu), but the rest is just standard nix config, of which, nearly all of it I reuse from the configuration for the rest of my machines.
Thanks for pointing out mitchellh/nixos-config. Do you have a config published for nixos with UTM? I’m having a heck of a time getting the screen resolution and font sizes where I want them and I’m kind of lost.
Yep. Note that there's nothing you need to do to configure display resolution in UTM / qemu. You do need the spice guest tools installed in your nixos vm though. The only thing you should need to do is set the resolution in whatever display manager you use in nixos. For me, I run the sway window manager. My display manager is kanshi.
Here's a branch that I has some aarch64 specific things in it that I'm using for my guest vm config (I will merge it into the main branch when I get an hour or two so this link might die at some point)
https://git.sr.ht/~averagechris/dotfiles/tree/aarch64-work-v...
I use UTM (a nice wrapper around qemu), but the rest is just standard nix config, of which, nearly all of it I reuse from the configuration for the rest of my machines.