nix-language

Teach Nix expression language fundamentals including syntax, functions, and derivations.

1|1|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/Jylhis/skills --skill nix-language-jylhis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nix-language
Source: https://github.com/Jylhis/skills/tree/main/skills/nix-language
Command: npx skills add https://github.com/Jylhis/skills --skill nix-language-jylhis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Nix-language provides in-depth explanations of the Nix expression language to help developers understand and work effectively with Nix code, derivations, and tooling.

Core Features & Use Cases

  • Comprehensive coverage of syntax, expressions, functions, builtins, let-in bindings, with expressions, inherit, rec, attrsets, attribute sets, and string interpolation.
  • Guidance on derivations, import, fetchurl, fixed-point patterns, nixpkgs lib functions, lambdas, operators, lazy evaluation, the callPackage pattern, and path coercion.
  • Practical use cases include building reusable Nix modules, composing attribute sets, and safely reasoning about Nix code across projects.

Quick Start

Create a minimal Nix expression and evaluate it with nix-build to see a derivation succeed.

Frequently Asked Questions about nix-language

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

FAQPage Schema
How do I write a basic Nix expression and build a derivation?

To write a Nix expression, define an attribute set with derivation parameters and evaluate it using nix-build. This process compiles the specified inputs into a reproducible build output, validating your Nix code successfully.

What is the callPackage pattern in Nix and how does it work?

The callPackage pattern in Nix is a mechanism for automatically injecting dependencies into a derivation function. It resolves required attribute sets from the package set, simplifying dependency management and making Nix expressions modular and reusable across projects.

How do let-in bindings, with expressions, and rec attrsets work in Nix?

Let-in bindings, with expressions, and recursive (rec) attribute sets manage variable scope and dependency resolution in Nix expressions. They allow local variable definitions, scope injection, and self-referential attribute sets for safe and structured program reasoning.

Can I use Nix builtins and nixpkgs lib functions for complex derivations?

Yes, Nix builtins and nixpkgs lib functions provide essential utilities for complex derivations. They offer string manipulation, list processing, and fixed-point patterns, enabling developers to compose attribute sets and design reusable Nix modules effectively.

Why does lazy evaluation matter when working with Nix expressions?

Lazy evaluation in Nix expressions ensures values are only computed when needed, preventing infinite loops and optimizing build performance. It allows safe reasoning about large attribute sets and derivations without evaluating unnecessary dependencies upfront.