Hasty Briefsbeta

Bilingual

Coding Agent VMs on NixOS with microvm.nix

a day ago
  • The author describes creating ephemeral VMs with microvm.nix on NixOS to run coding agents like Claude Code safely, isolating them from personal files so the VM can be discarded if compromised.
  • Step-by-step setup includes: configuring a network bridge (microbr) with NAT, adding microvm as a Nix flake input, declaring VMs in microvm.nix, using a base configuration for shared directories, SSH keys, an 8GB disk overlay, and cloud-hypervisor with 8 vCPUs and 4GB RAM.
  • The author shows how Claude Code can automate VM creation using a skill, and notes that this setup's maintenance is minimal as it updates with the host NixOS config.