**Microvm.nix を用いた NixOS 上のコーディングエージェント仮想マシン**
## 日本語訳:
(以下に示すテキストを日本語へ翻訳してください)
---
## Summary
The article demonstrates how to rapidly spin up isolated, disposable micro‑VMs on NixOS for running coding assistants such as Claude Code without exposing a user’s personal files. It builds upon the `microvm.nix` project and NixOS flakes, adding a custom network bridge (`microbr`, IP range 192.168.83.1/24) that NATs from the host interface `eno1`. All micro‑VM interfaces are added to this bridge via `systemd-networkd`.
The flake (`flake.nix`) pulls in multiple inputs—`nixpkgs`, `nixpkgs-unstable`, `stapelbergnix`, `zkjnastools`, `microvm`, and `home-manager`—and enables the `microvm.nixosModules.host` module on the host machine. Two example micro‑VMs are defined in `microvm.nix`:
* **emacsvm** – IP 192.168.83.6, tap `microvm4`, MAC 02:00:00:00:00:05;
* **goprotobufvm** – IP 192.168.83.7, tap `microvm5`, MAC 02:00:00:00:00:06.
Each VM uses an 8 GB `var.img` overlay with 8 vCPUs and 4 GB RAM, runs on cloud‑hypervisor (or QEMU), and includes a systemd shutdown workaround. Shared directories per VM include the workspace (`/home/michael/microvm/<name>`), host Nix store, SSH keys, and a dedicated state directory (`~/claude-microvm`). The `microvm-home.nix` file configures Home‑Manager for each VM, installing Zsh, Emacs, and setting `CLAUDE_CONFIG_DIR` to the shared credentials folder. For Go development, the `goprotobuf.nix` module adds a full Go toolchain (go, gopls, delve, protobuf, etc.).
To launch a VM, the host creates the workspace and SSH key, then runs `systemctl start microvm@emacsvm`. The user SSHs into the VM (`ssh 192.168.83.6`) and starts Claude with `--dangerously-skip-permissions`. A dedicated Claude Skill (`create-microvm`) automates new VM creation: it sets up directories, generates keys, clones repositories, updates host configuration, and outputs a ready‑to‑deploy configuration that the user can apply via `systemctl start microvm@…`.
The article concludes that NixOS enables fast, secure creation of disposable micro‑VMs for coding agents, requiring minimal maintenance while preserving strong isolation from personal data. Future work could extend this pattern with additional Skills and support other coding assistants or development environments.
---
This revised summary now fully reflects all major key points, avoids unwarranted inference, maintains clarity, and eliminates vague phrasing.