Nix Config Debug logo

Nix Config Debug

CommunityPopular
ryan4yin
nix-config-debug

Use when something here is broken or stops working: an eval or build error, a failed activation, a dead or restarting unit, a mihomo or DNS outage, an unreachable host or MicroVM guest, or a failing CI action.

Overview

Publisherryan4yin
Repositorynix-config
Skill namenix-config-debug
Stars
2.1K
Forks
104
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ryan4yin on GitHub. Read the source before you install it.

Installation

Install the Nix Config Debug AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ryan4yin/nix-config/tree/main/.agents/skills/nix-config-debug
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ryan4yin/nix-config.git /tmp/nix-config
mkdir -p .claude/skills
cp -r /tmp/nix-config/.agents/skills/nix-config-debug .claude/skills/nix-config-debug
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Nix Config Debug in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Nix Config Debug on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Nix Config Debug is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Debugging this repository

Follow the global diagnosing-bugs skill for the process (a reproducible signal and root cause before any fix). This skill is only the map: which layer failed, and where to look. Rolling back, isolating a bad input bump, and the commands that destroy rollback points are in the nix-config-update skill.

Core rules

  1. Restore service first. A down host or a dead session gets the previous generation before any investigation. Rolling back the machine you are on needs sudo, so the user does it.
  2. Name the layer before touching code. Eval, build, activation, and runtime failures have different causes; a green just test says nothing about activation.

1. Localize by layer

Each layer: symptom, then where to look.

  • eval (just test fails, an eval error): just eval-host <host> (already passes --show-trace)
  • build (build error, hash mismatch, "marked as broken"): just build-host <host>, then nix log <drv>
  • activation (the deploy fails after building): the deploy output; journalctl -u home-manager-$USER -b for Home Manager
  • runtime (a unit is failed or restarting): just list-failed, systemctl status <unit>, journalctl -u <unit> -b
  • proxy/DNS (proxied sites time out, or DNS still resolves after mihomo stops): dig +short <site> must return a fake-ip (198.18.x.x); a real IP means the resolver bypasses dns-hijack; on ai the resolvectl dns/revert hook in hosts/idols-ai/default.nix ties link DNS to mihomo's lifecycle and other mihomo hosts have no such hook, so read resolvectl status before concluding; a statically set link DNS would outlive a dead mihomo. Config and gotchas: mihomo README; regenerate with just mihomo-gen, then restart mihomo.service
  • boot (errors at boot, wrong kernel): journalctl -b -p err; just history for what is booted
  • session (desktop or app misbehaves): journalctl --user -b -p err; the nix-config-desktop skill
  • remote host (anything on a Colmena host): ssh root@<host> journalctl -b -p err, same commands over SSH
  • MicroVM guest (guest down or unreachable): on the VM host: systemctl status microvm@<guest> and microvm-tap-interfaces@<guest>; then br0
  • secrets (missing or unreadable /run/agenix/<name>): the nix-config-secrets skill
  • shell (nushell exits 1 with File not found): whether ~/.secrets/ exists on the host; the nix-config-secrets skill
  • CI (a GitHub Action keeps failing): gh run list --workflow <wf>, gh run view <run> --log-failed

2. Read the evaluated value

When just test fails, re-run the suite directly to get the trace (nix eval exits 0 even when the suite returns false, so read its output):

bash
nix eval .#evalTests --show-trace

The trace names the failing test under outputs/<system>/tests/<name>/. Read its expr.nix and expected.nix, and evaluate the expression to see what actually came out before changing anything.

Most eval-layer questions are "what did this option actually end up as?". Ask the configuration directly instead of reading modules:

bash
nix eval .#nixosConfigurations.<host>.config.<option.path>
nix eval .#nixosConfigurations.<host>.config.systemd.services \
  --apply 's: builtins.filter (n: builtins.match "microvm.*" n != null) (builtins.attrNames s)'
nix repl   # then `:lf .` and inspect nixosConfigurations.<host>.config

Renamed or removed options are the most common eval break after an update; the error or warning names the replacement. Treat deprecation warnings as failures waiting to happen.

3. Your change or the update?

git status, git log --oneline -5 -- flake.lock, and git diff flake.lock tell you which. If the lock moved, isolate the input as described in the nix-config-update skill before reading code. Preserve unrelated working-tree changes; do not use git checkout, git stash, or cleanup commands to manufacture a clean tree without authorization.

4. Prove the fix

Re-run the exact command that failed, then just test, then just build-host <host> for every affected host before anyone deploys. For a running service, confirm the live config is the one just generated (service activation time against the file's mtime) and restart if they differ. Report the evidence ("the unit is active, just test is true"), not the intent.

Frequently asked questions

What does the Nix Config Debug AI skill do?

Use when something here is broken or stops working: an eval or build error, a failed activation, a dead or restarting unit, a mihomo or DNS outage, an unreachable host or MicroVM guest, or a failing CI action.

Why use Nix Config Debug on TypingMind?

Because you install it once and use it with any model. Nix Config Debug is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Nix Config Debug in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ryan4yin/nix-config/tree/main/.agents/skills/nix-config-debug. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Nix Config Debug?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Nix Config Debug?

As many as you like. As long as a model supports skills, you can use Nix Config Debug with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Nix Config Debug AI skill free?

Yes. It is published on GitHub by ryan4yin under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇