debugging

Troubleshoot Nix evaluation and build errors with inspection commands.

18|1|Updated Jun 2, 2023
One-click install
npx skills add https://github.com/DaRacci/nix-config --skill debugging-daracci
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debugging
Source: https://github.com/DaRacci/nix-config/tree/main/.opencode/skills/debugging
Command: npx skills add https://github.com/DaRacci/nix-config --skill debugging-daracci

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you diagnose and resolve errors encountered during Nix configuration evaluation and package building, ensuring smoother system management.

Core Features & Use Cases

  • Evaluation Debugging: Use builtins.trace and nix eval to inspect values and identify issues during configuration parsing.
  • Build Debugging: View build logs, enable verbose output, and enter build environments to pinpoint build failures.
  • Use Case: When a NixOS configuration fails to build, use this Skill to trace the evaluation of a specific option or inspect build logs to understand the root cause.

Quick Start

Use the debugging skill to show the trace for a failed Nix build.

Frequently Asked Questions about debugging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug infinite recursion errors during Nix evaluation?

Debug infinite recursion in Nix evaluation by using builtins.trace to inspect values and nix eval to identify the specific configuration parsing loop causing the failure.

What is the best way to view build logs for a failed Nix package?

The best way to view Nix build logs is to enable verbose output and inspect the logs directly, allowing you to pinpoint the exact build failures and root causes.

How do I inspect flake syntax when troubleshooting a Nix build error?

Inspect flake syntax during Nix troubleshooting by using specific commands to evaluate flake outputs, helping you resolve attribute not found or type mismatch errors.

Can I enter a build environment to pinpoint Nix build failures?

Yes, you can enter a Nix build environment to pinpoint build failures, allowing you to interactively test configurations and diagnose assertion failures or missing dependencies.

Why does my NixOS configuration fail with an attribute not found error?

An attribute not found error occurs when NixOS configuration evaluation references missing values; use nix eval to trace the specific option and inspect the root cause.

How do I trace the evaluation of a specific NixOS option?

Trace the evaluation of a specific NixOS option by applying builtins.trace within your configuration, enabling you to inspect intermediate values during parsing.