2026-04-10 09:37:25 +02:00
2026-04-07 10:36:29 +02:00
2026-03-10 17:21:34 +00:00
2026-03-10 17:21:34 +00:00
2026-04-13 11:49:42 +02:00
2026-04-10 09:36:02 +02:00
2026-03-10 17:21:34 +00:00

Claude-VM

Shamelessly stole and refactored from https://github.com/solomon-b/claude-vm.

A headless QEMU VM with claude-code installed. Your current directory is mounted into the VM at /workspace.

Uses npins for dependency pinning and classic Nix (no flakes).

Usage

nix build -f . claude-vm
result/bin/claude-vm
result/bin/claude-vm --dangerously-skip-permissions
result/bin/claude-vm --model sonnet
result/bin/claude-vm -p "fix the tests"

or

nix run git+https://git.oceanbox.io/oceanbox/claude-vm#claude-vm --impure

All arguments are forwarded to claude-code inside the VM.

Home Manager (Npins)

To add claude-vm as a package in your home-manager configuration using npins:

# In your home-manager config directory
npins add git https://git.oceanbox.io/oceanbox/claude-vm -b main

Then reference it in your home.nix:

let
  sources = import ./npins;
  claude-vm = (import sources.claude-vm).claude-vm;
in {
  home.packages = [ claude-vm ];
}

Development Shell

# First time setup
direnv allow

direnv watches shell.nix and rebuilds the environment automatically.

Updating Dependencies

npins update              # update all pins to latest
npins update nixpkgs      # update a single pin

What's Inside

  • NixOS VM: 4 gigabytes RAM, 4 cores, serial console
  • Packages: claude-code, git, curl, vim
  • 9p shared directory: host CWD mounted read-write at /workspace
  • Auto-login as claude user, claude-code launches automatically

Exit

Press Ctrl-A X to quit QEMU.

S
Description
No description provided
Readme 55 KiB
Languages
Nix 100%