When should you use it?
- You self-host services at home
- You want declarative config
- You can review diffs before applying
Not for: People new to Linux; Hosts you cannot reach if a change breaks networking
What do you need, and what do you get?
You need
- Machines running NixOS
- Config repo
- Agent block list
You get
- Config changes as reviewable diffs
- Blocked apply command
- Services managed from one repo
How does it work, step by step?
- One repoKeep the config for every machine in a single git repo.
- Block the switchDeny the agent the command that applies the config.
- Ask for changesHave it edit config for a new service or update.
- ReviewRead the diff and check what it changes.
- Apply yourselfRun the rebuild by hand and keep the previous generation for rollback.
The prompt
Our own prompt, inspired by wraptile on Hacker News and written to work in Claude Code. Values in lime are placeholders.
Fill in the blanks (optional; the copied prompt uses your values)
Edit my NixOS config in {repo} to {change}. Do not run nixos-rebuild switch or any command that applies the config. Show me the diff, explain what each change does, note any service restarts or network changes, and tell me how to roll back if it fails.
Inspired by wraptile on Hacker News: Comment in Ask HN: What do you run on a $5 VPS that's worth keeping online 24/7?. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- A bad network change can lock you out; keep local access.
- Back up data separately from config.
- Exposed services need updates; check them regularly.
Our take
What makes this setup work is that NixOS turns an entire machine into text, so an agent's change is just a diff you can read before anything happens. wraptile's one hard rule, that Claude Code can change files in the repo while the nixos-rebuild switch step stays off limits, splits the job cleanly: the model drafts, the owner decides. Copy that split exactly. Put the rebuild command on the agent's deny list rather than relying on a polite instruction, and read each diff with the same suspicion you would give a stranger's pull request, because a wrong firewall rule or a removed service only shows up after the switch. Keep a way to reach the console of the laptop you are changing, since a bad network change can lock you out of the box remotely. Remember that NixOS rollbacks restore configuration, not data, so the restic backups still matter. The hardware tip is underrated too: two old laptops sip power and replace a pair of rented servers. Splitting private and public services across them also limits the damage if a public app is ever compromised.
Where the time goes back: Home server changes become fast edits with a review step instead of risky console sessions.
FAQ
Why block the switch?
What hardware?
Source and credit
Inspired by wraptile on Hacker News. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- Comment in Ask HN: What do you run on a $5 VPS that's worth keeping online 24/7?
- Creator
- wraptile on Hacker News
- Published on
- Hacker News
- Original date
- Oct 9, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Claude Code
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends, bookings or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.