Reproducible dev VM from a flake
Use a flake when you want the development runtime to be reviewable and repeatable.
Project layout
Section titled “Project layout”my-dev-vm/├── flake.nix├── flake.lock└── mvm.tomlflake.nix declares the guest content. mvm.toml selects the profile and
runtime sizing.
Build and boot
Section titled “Build and boot”mvmctl build ./my-dev-vmmvmctl up ./my-dev-vm --name my-dev-vmmvmctl console my-dev-vmUse mvmctl exec for scripted commands and mvmctl console for interactive
debugging.
Iterate
Section titled “Iterate”$EDITOR flake.nixnix flake updatemvmctl build ./my-dev-vmmvmctl down my-dev-vmmvmctl up ./my-dev-vm --name my-dev-vmOnly update flake.lock when you intend to change inputs. Review that diff.
Security checklist
Section titled “Security checklist”- Pin flake inputs.
- Keep secrets out of the flake and manifest.
- Use declared volumes or file transfer for state that should survive.
- Treat snapshots as sensitive state.