Skip to content
agentusehub

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.

Time saved
Not reported
Setup time
Not reported
Running cost
Not reported
Cost range
Not reported

Use case overview

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.

Reported experience

  1. 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.

  2. 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.

  3. Worth knowing

    Block nixos-rebuild switch for the agent so every change to a live machine gets human review before it is applied.

Example prompts

Try 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.
Software & DevOps

Port a Chrome extension to Safari

The author had ChatGPT take the Session Buddy extension source from Chrome, port it to Safari and install it, taking about 20 minutes.

ChatGPT