name: nix
description: Develop with Nix including packages, flakes, NixOS, and derivations. Activate when working with .nix files, flake.nix, flake.lock, or user mentions Nix, nixpkgs, NixOS, derivations, flakes, nix-shell, nix develop, home-manager, or packaging.
Nix Development
Research-first Nix development using parallel DeepWiki queries for accurate, up-to-date information.
Workflow
1. IDENTIFY → Match question to relevant repos
2. QUERY → Launch parallel subagents to query DeepWiki
3. SYNTHESIZE → Combine results into actionable guidance
Launch subagents to query relevant repos simultaneously:
// Single message with multiple parallel Task calls:
Task(
subagent_type="Explore",
model="haiku",
prompt="Use mcp__deepwiki__ask_question to query repo 'NixOS/nixpkgs' with question: '<USER_QUESTION>'. Return the key findings."
)
Task(
subagent_type="Explore",
model="haiku",
prompt="Use mcp__deepwiki__ask_question to query repo 'NixOS/nix.dev' with question: '<USER_QUESTION>'. Return the key findings."
)
Example Query Patterns
"How do I package a Rust CLI tool?"
→ Query NixOS/nixpkgs: "How does buildRustPackage work? What attributes are required?"
→ Query nix-community/nix-init: "How to generate a Rust package derivation from a GitHub URL?"
"How do I create a flake with multiple systems?"
→ Query NixOS/nix.dev: "How do flakes handle multiple systems?"
→ Query hercules-ci/flake-parts: "How to use perSystem for multi-platform flakes?"
"How do I update a package in nixpkgs?"
→ Query Mic92/nix-update: "How to use nix-update to bump package versions?"
→ Query Mic92/nixpkgs-review: "How to test package changes with nixpkgs-review?"
"How do I override a package?"
→ Query NixOS/nixpkgs: "How do override and overrideAttrs work?"
→ Query NixOS/nix.dev: "What are overlays and how to use them?"