nix-agent

Solid

Use when a user wants to change NixOS packages, options, modules, or local configuration and the host exposes the nix-agent MCP server (usually alongside mcp-nixos).

AI & Automation 15 stars 2 forks Updated today MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
40
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Nix Agent ## Overview `nix-agent` MCP tools do NOT read or write files. They build, diff, switch, and manage generations (the operational core), and evaluate, locate, and check the live config (introspection), handing every result back as a compact JSON envelope. Read the envelope: it already holds what you would otherwise re-fetch by hand. Division of labor: - **Your native tools** (Read/Edit/Write) edit `.nix` files. - **`mcp-nixos`** discovers packages and options (what exists, what it means). - **`nix-agent`** operates on the user's actual configuration (what their machine resolves, whether it builds, what a switch would change). ## Tool Surface Seven tools in two tiers. All auto-resolve the target when `flake_uri` is omitted and echo back what they resolved and ran (`resolved_target` and `command`, or `commands` for `check("lint")`), plus `raw_bytes`/ `returned_bytes` accounting when present (see Token discipline). Operational core: - `build(flake_uri?, mode?)`: build the closure, no activation. A failed build carries `failed_derivation`. - `diff(flake_uri?, mode?)`: what a switch would change (adds/removes/ version bumps), plus a structured `packages` object when it parses. Show this before switching. - `switch(flake_uri?, mode?, validate?, full_log?)`: activate. Records `rollback_generation`, returns a `summary` (units changed, derivations built, `packages` vs the rollback generation, `health`), and trims the log to a tail on success. `validate=True...

Details

Author
JEFF7712
Repository
JEFF7712/nix-agent
Created
4 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category