The moment I started using AI coding agents like Claude Code with real shell access, I realised my normal dev setup wasn’t built for this.
These agents can install packages, change configs, run scripts, and generally operate your machine like a very fast junior engineer with root access. That’s powerful—but also risky. I didn’t want experiments happening on my primary environment.
What I needed was a development setup that was both reproducible and disposable: spin up a fresh VM, preload all my dev tools, let the agent work, and throw it away if needed.
Using NixOS + Home Manager made that practical. My entire environment became portable—one command and the same setup anywhere.
Wrote the full setup in a Towards AI article, including full code and agent wiring with nix-agent-wire.
I’m still relatively new to the Nix world, so I’m especially interested in how others here approach this. If there are better patterns for agent-safe, portable dev environments, I’d genuinely love to learn.
Article 🔗 : https://towardsai.net/p/machine-learning/the-dev-environment-setup-every-ai-engineer-should-have