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
Repo Routing
Language & Concepts
| Topic |
Repos to Query |
| Nix language, builtins, syntax |
NixOS/nix.dev |
| Attribute sets, functions, let bindings |
NixOS/nix.dev |
| Lazy evaluation, recursion |
NixOS/nix.dev |
| Derivations (concept) |
NixOS/nix.dev |
| Nix store, paths, hashes |
NixOS/nix.dev |
| String interpolation, multiline strings |
NixOS/nix.dev |
| Path handling, ./. vs toString |
NixOS/nix.dev |
| Import, imports, IFD |
NixOS/nix.dev |
| lib functions (mkIf, mkOption, etc.) |
NixOS/nixpkgs, NixOS/nix.dev |
| Nix REPL, nix eval |
NixOS/nix.dev |
Packaging
| Topic |
Repos to Query |
| stdenv, mkDerivation |
NixOS/nixpkgs |
| Build phases (configure, build, install, check) |
NixOS/nixpkgs |
| Fetchers (fetchFromGitHub, fetchurl, fetchgit) |
NixOS/nixpkgs |
| Dependencies (buildInputs, nativeBuildInputs, propagatedBuildInputs) |
NixOS/nixpkgs |
| Patches, substituteInPlace, patchShebangs |
NixOS/nixpkgs |
| Wrappers (makeWrapper, wrapProgram, symlinkJoin) |
NixOS/nixpkgs |
| Meta attributes, licenses, maintainers |
NixOS/nixpkgs |
| Creating packages from URLs |
nix-community/nix-init, NixOS/nixpkgs |
| Cross-compilation, pkgsCross |
NixOS/nixpkgs |
| Static builds, pkgsStatic, pkgsMusl |
NixOS/nixpkgs |
| Trivial builders (writeShellScript, writeText, runCommand) |
NixOS/nixpkgs |
| Passthru attributes, tests |
NixOS/nixpkgs |
Language-Specific Builders
| Topic |
Repos to Query |
| Rust (buildRustPackage, cargoHash) |
NixOS/nixpkgs |
| Go (buildGoModule, vendorHash) |
NixOS/nixpkgs |
| Python (buildPythonPackage, buildPythonApplication) |
NixOS/nixpkgs |
| Node.js (buildNpmPackage, node2nix) |
NixOS/nixpkgs |
| Haskell (haskellPackages, cabal2nix) |
NixOS/nixpkgs |
| Java, Maven, Gradle |
NixOS/nixpkgs |
| C/C++ (cmake, meson, autotools) |
NixOS/nixpkgs |
Flakes
| Topic |
Repos to Query |
| Flake basics, inputs, outputs |
NixOS/nix.dev |
| Flake templates, init |
NixOS/nix.dev |
| Flake modules, composition |
hercules-ci/flake-parts |
| perSystem, multi-platform |
hercules-ci/flake-parts |
| Flake overlays |
hercules-ci/flake-parts, NixOS/nix.dev |
| Flake checks, nix flake check |
NixOS/nix.dev, hercules-ci/flake-parts |
| Flake apps, nix run |
NixOS/nix.dev |
| Flake lock, updating inputs |
NixOS/nix.dev |
| follows, input overrides |
NixOS/nix.dev |
| Flake-compat (legacy support) |
NixOS/nix.dev |
Development
| Topic |
Repos to Query |
| Development shells (mkShell, devShells) |
NixOS/nixpkgs, NixOS/nix.dev |
| nix develop, nix-shell |
NixOS/nix.dev |
| direnv integration |
NixOS/nix.dev |
| Environment variables |
NixOS/nixpkgs |
Overrides & Customization
| Topic |
Repos to Query |
| override, overrideAttrs |
NixOS/nixpkgs |
| Overlays |
NixOS/nixpkgs, NixOS/nix.dev |
| packageOverrides |
NixOS/nixpkgs |
| Fixed-point evaluation |
NixOS/nix.dev |
NixOS & System Config
| Topic |
Repos to Query |
| NixOS modules, options |
NixOS/nix.dev |
| NixOS configuration |
NixOS/nix.dev |
| systemd services |
NixOS/nix.dev |
| Users, groups, permissions |
NixOS/nix.dev |
| Networking, firewall |
NixOS/nix.dev |
| Boot, GRUB, systemd-boot |
NixOS/nix.dev |
| Filesystems, partitions |
NixOS/nix.dev |
Home Manager
| Topic |
Repos to Query |
| Home-manager basics, installation |
nix-community/home-manager |
| User environment, dotfiles |
nix-community/home-manager |
| Home-manager modules, options |
nix-community/home-manager |
| Programs configuration (git, vim, etc.) |
nix-community/home-manager |
| Home-manager + NixOS |
nix-community/home-manager, NixOS/nix.dev |
| Home-manager + nix-darwin |
nix-community/home-manager, nix-darwin/nix-darwin |
| Home-manager standalone |
nix-community/home-manager |
macOS (nix-darwin)
| Topic |
Repos to Query |
| nix-darwin basics, installation |
nix-darwin/nix-darwin |
| macOS system configuration |
nix-darwin/nix-darwin |
| Darwin modules, options |
nix-darwin/nix-darwin |
| Homebrew integration |
nix-darwin/nix-darwin |
| macOS services, launchd |
nix-darwin/nix-darwin |
| Darwin + home-manager |
nix-darwin/nix-darwin, NixOS/nix.dev |
Contributing & Tooling
| Topic |
Repos to Query |
| Updating package versions/hashes |
Mic92/nix-update |
| Testing nixpkgs changes |
Mic92/nixpkgs-review |
| nixpkgs contribution workflow |
Mic92/nix-update, Mic92/nixpkgs-review |
| pkgs/by-name structure |
NixOS/nixpkgs |
Testing & CI
| Topic |
Repos to Query |
| NixOS tests, nixosTest |
NixOS/nixpkgs, NixOS/nix.dev |
| VM tests, runNixOSTest |
NixOS/nixpkgs |
| Package tests, passthru.tests |
NixOS/nixpkgs |
| Hydra CI |
NixOS/nix.dev |
| GitHub Actions with Nix |
NixOS/nix.dev |
Containers & Images
| Topic |
Repos to Query |
| Docker images, dockerTools |
NixOS/nixpkgs |
| OCI images, buildImage |
NixOS/nixpkgs |
| Minimal Docker images, streamLayeredImage |
NixOS/nixpkgs |
| VM images, disk images |
NixOS/nixpkgs |
| ISO images |
NixOS/nixpkgs |
Debugging & Maintenance
| Topic |
Repos to Query |
| Build failures, debugging |
NixOS/nixpkgs, NixOS/nix.dev |
| Garbage collection, nix-collect-garbage |
NixOS/nix.dev |
| Binary caches, substituters, Cachix |
NixOS/nix.dev |
| Nix profiles, generations |
NixOS/nix.dev |
| Nix daemon, nix.conf |
NixOS/nix.dev |
| Sandboxing, pure evaluation |
NixOS/nix.dev |
| Reproducibility, content-addressing |
NixOS/nix.dev |
Query multiple repos when topics overlap.
Parallel DeepWiki Queries
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?"
DeepWiki Repos
| Repo |
Best For |
NixOS/nix.dev |
Nix language, tutorials, flake basics, NixOS |
NixOS/nixpkgs |
Package builders, stdenv, overrides, packaging patterns |
nix-community/nix-init |
Auto-generating derivations from URLs |
nix-community/home-manager |
User environment, dotfiles, program configs |
Mic92/nix-update |
Bumping versions and updating hashes |
Mic92/nixpkgs-review |
Testing PRs and local changes |
hercules-ci/flake-parts |
Modular flake configuration, perSystem |
nix-darwin/nix-darwin |
macOS system configuration, Darwin modules, launchd |
1---2name: nix-23description: 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.4---5
6# Nix Development
7
8Research-first Nix development using **parallel DeepWiki queries** for accurate, up-to-date information.
9
10## Workflow
11
12```
131. IDENTIFY → Match question to relevant repos
142. QUERY → Launch parallel subagents to query DeepWiki
153. SYNTHESIZE → Combine results into actionable guidance
16```
17
18## Repo Routing
19
20### Language & Concepts
21| Topic | Repos to Query |
22|-------|----------------|
23| Nix language, builtins, syntax | `NixOS/nix.dev` |
24| Attribute sets, functions, let bindings | `NixOS/nix.dev` |
25| Lazy evaluation, recursion | `NixOS/nix.dev` |
26| Derivations (concept) | `NixOS/nix.dev` |
27| Nix store, paths, hashes | `NixOS/nix.dev` |
28| String interpolation, multiline strings | `NixOS/nix.dev` |
29| Path handling, ./. vs toString | `NixOS/nix.dev` |
30| Import, imports, IFD | `NixOS/nix.dev` |
31| lib functions (mkIf, mkOption, etc.) | `NixOS/nixpkgs`, `NixOS/nix.dev` |
32| Nix REPL, nix eval | `NixOS/nix.dev` |
33
34### Packaging
35| Topic | Repos to Query |
36|-------|----------------|
37| stdenv, mkDerivation | `NixOS/nixpkgs` |
38| Build phases (configure, build, install, check) | `NixOS/nixpkgs` |
39| Fetchers (fetchFromGitHub, fetchurl, fetchgit) | `NixOS/nixpkgs` |
40| Dependencies (buildInputs, nativeBuildInputs, propagatedBuildInputs) | `NixOS/nixpkgs` |
41| Patches, substituteInPlace, patchShebangs | `NixOS/nixpkgs` |
42| Wrappers (makeWrapper, wrapProgram, symlinkJoin) | `NixOS/nixpkgs` |
43| Meta attributes, licenses, maintainers | `NixOS/nixpkgs` |
44| Creating packages from URLs | `nix-community/nix-init`, `NixOS/nixpkgs` |
45| Cross-compilation, pkgsCross | `NixOS/nixpkgs` |
46| Static builds, pkgsStatic, pkgsMusl | `NixOS/nixpkgs` |
47| Trivial builders (writeShellScript, writeText, runCommand) | `NixOS/nixpkgs` |
48| Passthru attributes, tests | `NixOS/nixpkgs` |
49
50### Language-Specific Builders
51| Topic | Repos to Query |
52|-------|----------------|
53| Rust (buildRustPackage, cargoHash) | `NixOS/nixpkgs` |
54| Go (buildGoModule, vendorHash) | `NixOS/nixpkgs` |
55| Python (buildPythonPackage, buildPythonApplication) | `NixOS/nixpkgs` |
56| Node.js (buildNpmPackage, node2nix) | `NixOS/nixpkgs` |
57| Haskell (haskellPackages, cabal2nix) | `NixOS/nixpkgs` |
58| Java, Maven, Gradle | `NixOS/nixpkgs` |
59| C/C++ (cmake, meson, autotools) | `NixOS/nixpkgs` |
60
61### Flakes
62| Topic | Repos to Query |
63|-------|----------------|
64| Flake basics, inputs, outputs | `NixOS/nix.dev` |
65| Flake templates, init | `NixOS/nix.dev` |
66| Flake modules, composition | `hercules-ci/flake-parts` |
67| perSystem, multi-platform | `hercules-ci/flake-parts` |
68| Flake overlays | `hercules-ci/flake-parts`, `NixOS/nix.dev` |
69| Flake checks, nix flake check | `NixOS/nix.dev`, `hercules-ci/flake-parts` |
70| Flake apps, nix run | `NixOS/nix.dev` |
71| Flake lock, updating inputs | `NixOS/nix.dev` |
72| follows, input overrides | `NixOS/nix.dev` |
73| Flake-compat (legacy support) | `NixOS/nix.dev` |
74
75### Development
76| Topic | Repos to Query |
77|-------|----------------|
78| Development shells (mkShell, devShells) | `NixOS/nixpkgs`, `NixOS/nix.dev` |
79| nix develop, nix-shell | `NixOS/nix.dev` |
80| direnv integration | `NixOS/nix.dev` |
81| Environment variables | `NixOS/nixpkgs` |
82
83### Overrides & Customization
84| Topic | Repos to Query |
85|-------|----------------|
86| override, overrideAttrs | `NixOS/nixpkgs` |
87| Overlays | `NixOS/nixpkgs`, `NixOS/nix.dev` |
88| packageOverrides | `NixOS/nixpkgs` |
89| Fixed-point evaluation | `NixOS/nix.dev` |
90
91### NixOS & System Config
92| Topic | Repos to Query |
93|-------|----------------|
94| NixOS modules, options | `NixOS/nix.dev` |
95| NixOS configuration | `NixOS/nix.dev` |
96| systemd services | `NixOS/nix.dev` |
97| Users, groups, permissions | `NixOS/nix.dev` |
98| Networking, firewall | `NixOS/nix.dev` |
99| Boot, GRUB, systemd-boot | `NixOS/nix.dev` |
100| Filesystems, partitions | `NixOS/nix.dev` |
101
102### Home Manager
103| Topic | Repos to Query |
104|-------|----------------|
105| Home-manager basics, installation | `nix-community/home-manager` |
106| User environment, dotfiles | `nix-community/home-manager` |
107| Home-manager modules, options | `nix-community/home-manager` |
108| Programs configuration (git, vim, etc.) | `nix-community/home-manager` |
109| Home-manager + NixOS | `nix-community/home-manager`, `NixOS/nix.dev` |
110| Home-manager + nix-darwin | `nix-community/home-manager`, `nix-darwin/nix-darwin` |
111| Home-manager standalone | `nix-community/home-manager` |
112
113### macOS (nix-darwin)
114| Topic | Repos to Query |
115|-------|----------------|
116| nix-darwin basics, installation | `nix-darwin/nix-darwin` |
117| macOS system configuration | `nix-darwin/nix-darwin` |
118| Darwin modules, options | `nix-darwin/nix-darwin` |
119| Homebrew integration | `nix-darwin/nix-darwin` |
120| macOS services, launchd | `nix-darwin/nix-darwin` |
121| Darwin + home-manager | `nix-darwin/nix-darwin`, `NixOS/nix.dev` |
122
123### Contributing & Tooling
124| Topic | Repos to Query |
125|-------|----------------|
126| Updating package versions/hashes | `Mic92/nix-update` |
127| Testing nixpkgs changes | `Mic92/nixpkgs-review` |
128| nixpkgs contribution workflow | `Mic92/nix-update`, `Mic92/nixpkgs-review` |
129| pkgs/by-name structure | `NixOS/nixpkgs` |
130
131### Testing & CI
132| Topic | Repos to Query |
133|-------|----------------|
134| NixOS tests, nixosTest | `NixOS/nixpkgs`, `NixOS/nix.dev` |
135| VM tests, runNixOSTest | `NixOS/nixpkgs` |
136| Package tests, passthru.tests | `NixOS/nixpkgs` |
137| Hydra CI | `NixOS/nix.dev` |
138| GitHub Actions with Nix | `NixOS/nix.dev` |
139
140### Containers & Images
141| Topic | Repos to Query |
142|-------|----------------|
143| Docker images, dockerTools | `NixOS/nixpkgs` |
144| OCI images, buildImage | `NixOS/nixpkgs` |
145| Minimal Docker images, streamLayeredImage | `NixOS/nixpkgs` |
146| VM images, disk images | `NixOS/nixpkgs` |
147| ISO images | `NixOS/nixpkgs` |
148
149### Debugging & Maintenance
150| Topic | Repos to Query |
151|-------|----------------|
152| Build failures, debugging | `NixOS/nixpkgs`, `NixOS/nix.dev` |
153| Garbage collection, nix-collect-garbage | `NixOS/nix.dev` |
154| Binary caches, substituters, Cachix | `NixOS/nix.dev` |
155| Nix profiles, generations | `NixOS/nix.dev` |
156| Nix daemon, nix.conf | `NixOS/nix.dev` |
157| Sandboxing, pure evaluation | `NixOS/nix.dev` |
158| Reproducibility, content-addressing | `NixOS/nix.dev` |
159
160**Query multiple repos when topics overlap.**
161
162## Parallel DeepWiki Queries
163
164Launch subagents to query relevant repos simultaneously:
165
166```
167// Single message with multiple parallel Task calls:
168Task(
169 subagent_type="Explore",
170 model="haiku",
171 prompt="Use mcp__deepwiki__ask_question to query repo 'NixOS/nixpkgs' with question: '<USER_QUESTION>'. Return the key findings."
172)
173
174Task(
175 subagent_type="Explore",
176 model="haiku",
177 prompt="Use mcp__deepwiki__ask_question to query repo 'NixOS/nix.dev' with question: '<USER_QUESTION>'. Return the key findings."
178)
179```
180
181### Example Query Patterns
182
183**"How do I package a Rust CLI tool?"**
184```
185→ Query NixOS/nixpkgs: "How does buildRustPackage work? What attributes are required?"
186→ Query nix-community/nix-init: "How to generate a Rust package derivation from a GitHub URL?"
187```
188
189**"How do I create a flake with multiple systems?"**
190```
191→ Query NixOS/nix.dev: "How do flakes handle multiple systems?"
192→ Query hercules-ci/flake-parts: "How to use perSystem for multi-platform flakes?"
193```
194
195**"How do I update a package in nixpkgs?"**
196```
197→ Query Mic92/nix-update: "How to use nix-update to bump package versions?"
198→ Query Mic92/nixpkgs-review: "How to test package changes with nixpkgs-review?"
199```
200
201**"How do I override a package?"**
202```
203→ Query NixOS/nixpkgs: "How do override and overrideAttrs work?"
204→ Query NixOS/nix.dev: "What are overlays and how to use them?"
205```
206
207## DeepWiki Repos
208
209| Repo | Best For |
210|------|----------|
211| `NixOS/nix.dev` | Nix language, tutorials, flake basics, NixOS |
212| `NixOS/nixpkgs` | Package builders, stdenv, overrides, packaging patterns |
213| `nix-community/nix-init` | Auto-generating derivations from URLs |
214| `nix-community/home-manager` | User environment, dotfiles, program configs |
215| `Mic92/nix-update` | Bumping versions and updating hashes |
216| `Mic92/nixpkgs-review` | Testing PRs and local changes |
217| `hercules-ci/flake-parts` | Modular flake configuration, perSystem |
218| `nix-darwin/nix-darwin` | macOS system configuration, Darwin modules, launchd |