docs: add nixos-options MCP configuration
Some checks failed
Run nix flake check / flake-check (push) Failing after 13m51s

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-04 00:01:00 +01:00
parent 0e5dea635e
commit b5da9431aa
2 changed files with 29 additions and 0 deletions

View File

@@ -63,6 +63,23 @@ Examples:
- `template2: add proxmox image configuration`
- `terraform: add VM deployment configuration`
### NixOS Options Lookup
An MCP server is available for searching and looking up NixOS option documentation. This is useful when configuring new services or options for hosts.
**Session Setup:** At the start of each session, index the nixpkgs revision from `flake.lock` to ensure option documentation matches the project's nixpkgs version:
1. Read `flake.lock` and find the `nixpkgs` node's `rev` field
2. Call `index_revision` with that git hash
**Usage Examples:**
- `search_options` - Search for options by name or description (e.g., query "nginx" or "postgresql")
- `get_option` - Get full details for a specific option (e.g., `services.loki.configuration`)
- `get_file` - Fetch the source file from nixpkgs that declares an option
This ensures documentation matches the exact nixpkgs version (currently NixOS 25.11) used by this flake.
## Architecture
### Directory Structure