← Back to list

nix
by knoopx
pi.ai config
⭐ 2🍴 0📅 Jan 21, 2026
SKILL.md
name: nix description: Run applications without installation, create development environments, and evaluate Nix expressions. Use when executing packages temporarily, creating isolated environments, debugging expressions, or searching for packages.
Nix Skill
Nix is a powerful package manager and functional programming language. This skill covers common operations like running apps on-the-fly and managing environments.
Running Applications
You can run any application from nixpkgs without installing it permanently.
# Run a package once
nix run nixpkgs#hello
# Run a package with specific arguments
nix run nixpkgs#cowsay -- "Hello from Nix!"
# Run a command within a shell environment (non-interactive)
nix shell nixpkgs#git nixpkgs#vim --command git --version
# Run long-running applications (e.g., servers): `tmux new -d 'nix run nixpkgs#some-server'`
Evaluating Expressions (Debugging)
Since the environment is headless and non-interactive, use nix eval instead of the REPL for debugging.
# Evaluate a simple expression
nix eval --expr '1 + 2'
# Inspect an attribute from nixpkgs
nix eval nixpkgs#hello.name
# Evaluate a local nix file
nix eval --file ./default.nix
# List keys in a set (useful for exploration)
nix eval --expr 'builtins.attrNames (import <nixpkgs> {})'
Searching for Packages
# Search for a package by name or description
nix search nixpkgs python3
Common Nix Language Patterns
Variables and Functions
# Let binding
let
name = "Nix";
in
"Hello ${name}"
# Function definition
let
multiply = x: y: x * y;
in
multiply 2 3
Attribute Sets
{
a = 1;
b = "foo";
}
Troubleshooting
- Broken Builds: Use
nix logto see the build output of a derivation. - Dependency Issues: Use
nix-store -q --references $(which program)to see what a program depends on. - Cache issues: Add
--no-substituteto force a local build if you suspect a bad binary cache.
Related Skills
- nix-flakes: Use Nix Flakes for reproducible builds and dependency management in Nix projects.
- nh: Manage NixOS and Home Manager operations with improved output using nh.
Related Tools
- search-nix-packages: Search for packages available in the NixOS package repository.
- search-nix-options: Find configuration options available in NixOS.
- search-home-manager-options: Find configuration options for Home Manager.
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon