nix-assistant v0 · baseline
Live · Sovereign Xnode · No cloud API calls

Review any Nix config, get structured findings.

Paste a flake, a NixOS module, or a home-manager config. statix and deadnix run first; findings are augmented with RAG over 98k+ nixpkgs entries and 16k NixOS options; a small local LLM turns it all into line-by-line review comments. Open source, Apache-2.0.

Paste your config

flake.nix · configuration.nix · home.nix — up to 128 KB

⌘/Ctrl + Enter to run
1
Evaluation

Benchmark — every version on the same 25 cases

We run the same 25-case test suite against every version. No version ships unless it's an honest step forward on real metrics — line-exactness, severity match, no hallucinated options.

Benchmark code →
leaderboard chart
Metric v0 base Qwen 1.5B v0 live (hermes3:3b) v0.1 LoRA (trained)
schema_valid100%96%96%
no_hallucinated_optionsn/a88.9%100%
line_exact0%20%90%
severity_match20%45%75%
message_keywords_hit0%25%45%
empty_on_negative0%0%0% (v0.2 target)
avg latency5.5 s18 s3.3 s

base Qwen's 100% is illusory — every output triggered the review pipeline's escape-hatch fallback (no real review emitted, valid shape by coincidence). The headline number is line_exact: 20% → 90% and no_hallucinated_options: 100% — the model never cites a NixOS option path that doesn't exist in the real module tree.

v0 baseline · wrong
Input: environment.systemPackages = [ fooo ];
line 0 · hint
  texlive: Consider using texliveConTeXt
  for TeX Live environment.

Never mentions fooo. Hallucinates texlive. Classic slop.

v0.1 trained · correct
Same input.
line 3 · error
  `fooo` is not a nixpkgs attribute
  — did you mean `vim`?

Right line. Right severity. Names the bug. Suggests the fix.

Methodology

How it works

1. Lint
statix + deadnix

Deterministic linters catch redundant defaults, unused bindings, deprecated attrs, useless parens before the LLM runs.

2. Retrieve
nomic-embed + numpy cosine

98,382 packages + 16,095 NixOS options pre-embedded. At review time, findings + attr-paths are searched to pull relevant context into the prompt.

3. Review
hermes3:3b → nix-reviewer-1.5b (v0.1)

Currently serving hermes3:3b. v0.1 fine-tuned model trained on 445 synthesized (broken_config, review) pairs — deploying soon.

98k
nixpkgs packages
16k
NixOS options
445
training pairs (v0.1)
0
cloud API calls
How v0.1 was trained

The Nix evaluator is the teacher.

Every training pair is synthesized: we take a pattern (e.g. typo'd package name), generate an original Nix config exhibiting it, and run nix eval inside a Docker container to capture the real error message, line number, and column. The model learns to reproduce what the Nix compiler itself says. No forum content is reproduced — the dataset is entirely synthetic, Apache-2.0 clean.

Base:
Qwen2.5-Coder-1.5B-Instruct
Method:
LoRA (r=16, α=32)
Hardware:
Intel Arc 140T iGPU (48 GB)
Run locally

Run the model on your own machine

The Q4_K_M quantized build is ~986 MB and runs on CPU. If you have Ollama installed, it's two commands.

1 · pull the model
ollama pull hf.co/OpenxAILabs/nix-reviewer-1.5b-GGUF:Q4_K_M

One-time download. ~986 MB.

2 · review a config
ollama run hf.co/OpenxAILabs/nix-reviewer-1.5b-GGUF:Q4_K_M \
  '{ pkgs, ... }:
{
  environment.systemPackages = with pkgs; [ vim vvim ];
}'

Expected: [{"line": 4, "severity": "error", "message": "`vvim` is not a nixpkgs attribute..."}]

HTTP API (same shape as this site)
curl http://localhost:11434/api/chat -d '{
  "model": "hf.co/OpenxAILabs/nix-reviewer-1.5b-GGUF:Q4_K_M",
  "stream": false,
  "messages": [
    {"role": "system", "content": "You are nix-assistant. Review the Nix config and output ONLY a JSON array: [{\"line\":int,\"severity\":\"error\"|\"warning\"|\"hint\",\"message\":str}]"},
    {"role": "user", "content": "{ pkgs, ... }: { environment.systemPackages = with pkgs; [ vim vvim ]; }"}
  ]
}'