# Nix

> Search nixpkgs packages, NixOS options, and the NixOS wiki.

- Skill: `lukasl-dev/nix` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx get-skill add lukasl-dev/nix`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lukasl-dev/nix/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Category: Coding & Dev Tools
- Author: lukasl-dev (https://skillmd.com/u/lukasl-dev)
- Updated: 2026-11-25
- Page: https://skillmd.com/skills/lukasl-dev/nix

---

---
name: nix
description: Search nixpkgs packages, NixOS options, and the NixOS wiki.
compatibility: Requires curl and jq. Package/option commands additionally require nix with flakes enabled. Network may be needed for uncached refs and wiki access.
---

# Nix Skill

Use for authoritative Nix/NixOS data:

- nixpkgs packages
- NixOS options
- NixOS wiki pages

Prefer commit SHAs for reproducible nixpkgs answers; branch names like `nixos-unstable` can move.

Scripts print compact output. Nix commands suppress normal evaluator chatter and show stderr only on failure.

## NixOS options

### Search options

```bash
./scripts/search-options.sh REF QUERY [LIMIT]
./scripts/search-options.sh nixos-unstable openssh 20
```

JSON array fields: `name`, `description`, `type`, `default`. Search is case-insensitive and limited to option names.

### Show one option

```bash
./scripts/show-option.sh REF OPTION_PATH
./scripts/show-option.sh nixos-unstable services.openssh.enable
```

JSON fields: `name`, `description`, `type`, `default`, `example`, `declarations`.

## nixpkgs packages

### Search packages

```bash
./scripts/search-packages.sh REF QUERY [LIMIT]
./scripts/search-packages.sh nixos-unstable ripgrep 20
```

JSON array fields: `attr`, `pname`, `version`, `description`.

### Show one package

```bash
./scripts/show-package.sh REF ATTR_PATH
./scripts/show-package.sh nixos-unstable hello
```

JSON fields include `attrPath`, `pname`, `version`, `description`, `homepage`, `license`, `platforms`, `platforms_count`, `broken`, `insecure`, `available`.

## NixOS wiki

### Search wiki pages

```bash
./scripts/search-wiki.sh QUERY [LIMIT]
./scripts/search-wiki.sh Docker 10
```

JSON array fields: `title`, `pageid`, `snippet`. Pass a returned `title` to `read-wiki.sh`.

Prefer short, focused queries like `Rust`, `Docker`, or `Traefik`.

### Read a wiki page

```bash
./scripts/read-wiki.sh TITLE
./scripts/read-wiki.sh Docker
```

Prints the page's raw wikitext source.

## Notes

- `nix search` searches packages, not NixOS options.
- Exact package attr paths from search are usually usable with `show-package.sh`, but aliases can differ.
- Option/package evaluation can still be expensive on a cold cache.
- Wiki results come from `wiki.nixos.org` and may vary over time.

