Manage NixOS server configs with Claude Code

These VPS no longer make much sense for self-hosting imo. Task: The author replaced VPS hosting with two refurbished Lenovo K14 laptops running NixOS, using Tailscale and Cloudflare tunnels for connectivity. They use Claude Code to manage a configuration repository that defines the state of all machines, handling tasks like setting up Nextcloud, Syncthing, and Jellyfin. The human acts as the 'grand architect,' reviewing all proposed changes generated by Claude Code before manually executing `nixos-rebuild switch` to apply them.; tools: Claude Code. Human role: The original post does not say how a person stayed involved.; limitations: This approach requires familiarity with NixOS and declarative configuration management. Physical hardware introduces maintenance risks such as dust accumulation and hardware degradation, which VPS providers handle. The workflow depends on the reliability of Claude Code's output and the user's ability to review complex configuration diffs before applying them..

Tools

Claude Code

Published on Agent Work Atlas:

Overview

These VPS no longer make much sense for self-hosting imo.

Workflow

The author replaced VPS hosting with two refurbished Lenovo K14 laptops running NixOS, using Tailscale and Cloudflare tunnels for connectivity. They use Claude Code to manage a configuration repository that defines the state of all machines, handling tasks like setting up Nextcloud, Syncthing, and Jellyfin. The human acts as the 'grand architect,' reviewing all proposed changes generated by Claude Code before manually executing `nixos-rebuild switch` to apply them.

Reported result

The source does not report specific metrics on time saved or error reduction, but the author states that Claude Code effectively handles 'boring grunt work' while allowing them to maintain control over the infrastructure. The setup provides significant compute power with low energy consumption compared to VPS, though the author acknowledges it requires more maintenance than cloud services.

Human role

The original post does not say how a person stayed involved.

Limitations

This approach requires familiarity with NixOS and declarative configuration management. Physical hardware introduces maintenance risks such as dust accumulation and hardware degradation, which VPS providers handle. The workflow depends on the reliability of Claude Code's output and the user's ability to review complex configuration diffs before applying them.

Try it

I want to set up a self-hosted NixOS environment managed by Claude Code. I have two Lenovo K14 laptops running NixOS, connected via Tailscale and Cloudflare tunnels. My goal is to use Claude Code to generate and update configuration files for services like Nextcloud, Syncthing, and Jellyfin. Please help me create a workflow where Claude Code suggests changes to my `configuration.nix` files based on my requirements. Crucially, Claude Code must NOT execute `nixos-rebuild switch` or any command that applies changes. Instead, it should output the proposed diff and explain the changes. I will review these diffs manually and apply them myself. Start by analyzing my current `configuration.nix` file [replaceable input: paste current config]. Then, propose a change to add [replaceable input: e.g., 'a new service like Jellyfin']. Show me the exact code block to add and the resulting diff. Do not apply the change. Confirm you understand the restriction against executing rebuild commands.

Original source

Source reports are not independently verified. Publication date is the catalog publication date, not the original article date.

More cases · Software & development