nix

Write Nix expressions and manage NixOS and home-manager configurations.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/aster-void/dotfiles --skill nix-aster-void
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nix
Source: https://github.com/aster-void/dotfiles/tree/main/modules/home/profile-dev/programs/claude-code/skills/nix
Command: npx skills add https://github.com/aster-void/dotfiles --skill nix-aster-void

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you write Nix code and manage NixOS/home-manager configurations, reducing the friction of crafting flake definitions, modules, and debugging derivations.

Core Features & Use Cases

  • Nix expressions & Flakes: Write, compose, and test Nix configurations.
  • Home-manager configurations: Manage user environments across machines.
  • Debugging & tooling: Nix repl, flake checks, eval tips, and common pitfalls.

Quick Start

Generate a minimal Nix expression for a tiny package (e.g., hello) and show how to build it with nix-build.

Frequently Asked Questions about nix

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

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

A Nix derivation defines how to build a package by specifying inputs, build steps, and outputs. Write a derivation using `mkDerivation`, set dependencies and build commands, then build it with `nix-build` or `nix build` to produce the compiled result.

What's the difference between NixOS modules and flakes in Nix configuration?

NixOS modules are reusable configuration fragments with options and defaults for system settings. Flakes provide reproducible, versioned package and configuration management with pinned dependencies, replacing the need for channels and enabling deterministic builds across machines.

How do I set up home-manager to manage my user environment across machines?

Home-manager applies Nix configurations to user-level dotfiles and packages without requiring root access. Define your environment in a flake or configuration file, then activate it with `home-manager switch` to synchronize settings, programs, and shell configuration across systems.

Why isn't my Nix derivation building, and how do I debug it?

Use `nix repl` to test expressions interactively, `nix eval` to check configuration syntax, and `nix develop` to enter a build environment and inspect dependencies. Check for missing inputs, incorrect `pkgs` scope, or apply `lib.mkIf` to conditionally include problematic dependencies.

Can I use Nix to manage system configuration and user packages together?

Yes. NixOS manages system-level configuration through modules, while home-manager handles user-specific packages and dotfiles. Both integrate into flakes for unified, reproducible management of the entire system state across machines.