agentusecasesAll 1,012 use cases
Software & DevOps

Manage NixOS server configs with Claude Code

The author uses Claude Code to maintain the NixOS config repo for their self-hosted machines, blocked from running nixos-rebuild switch and reviewing each change before applying it manually.

Done withClaude Code

What they did
The author keeps one config repo that defines all their NixOS machines, two refurbished 32GB Lenovo laptops used as self-hosting servers, and has Claude Code work on it. Claude is restricted from running nixos-rebuild switch. The author reviews each change and runs the switch manually.
How it went
The source gives no results or numbers for the Claude workflow itself. It only says the review-then-switch setup is how they manage the machines, which run services like Nextcloud, Vaultwarden and Jellyfin.
Worth knowing
Block nixos-rebuild switch for the agent so every change to a live machine gets human review before it is applied.

Try it yourself with Claude Code

Help me maintain the NixOS config repo at [path to repo] for my machines [machine names]. Make this change: [describe change, such as adding a service or updating a package]. You may edit files and run dry builds, but never run nixos-rebuild switch. Show me the full diff and a plain-language explanation so I can review and apply it myself.

Read the original ↗

Source: HN · Oct 9, 2026

Five of these in your inbox every morning

The best things people got an AI agent to do, each with the prompt to try it.

More like this