nix-best-practices

Standardize Nix flake inputs, overlays, and unfree handling across projects.

53|7|Updated Jun 28, 2025
One-click install
npx skills add https://github.com/0xBigBoss/claude-code --skill nix-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nix-best-practices
Source: https://github.com/0xBigBoss/claude-code/tree/main/.claude/skills/nix-best-practices
Command: npx skills add https://github.com/0xBigBoss/claude-code --skill nix-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides standardized Nix best-practice patterns to streamline configuration management and reduce duplication across projects.

Core Features & Use Cases

  • Standardized flake inputs and overlays to prevent multiple nixpkgs downloads and drift across environments.
  • Clear guidance for unfree package handling, binary overlays, and devShell patterns to maintain consistency.
  • Use cases include multi-repo teams aligning Nix tooling and single-project refactoring with minimal churn.

Quick Start

Follow the included patterns to set up a flake with consistent inputs and overlays, and incorporate the devShell examples to bootstrap development environments across Linux and macOS.

Frequently Asked Questions about nix-best-practices

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

FAQPage Schema
How do I prevent duplicate nixpkgs downloads across multiple flake projects?

Standardizing flake inputs and overlays across multiple projects prevents duplicate nixpkgs downloads. This skill provides ready-to-copy configurations to align nixpkgs revisions, ensuring environments share the same fetched binaries instead of pulling redundant copies.

What is the best way to configure a devShell for multi-platform development using Nix?

Using flake-utils alongside standardized patterns is the best way to configure a devShell for multi-platform development. This skill offers concrete examples to bootstrap consistent development environments across Linux and macOS with minimal configuration drift.

How do I handle unfree packages in my Nix flake without breaking reproducibility?

Codifying clear unfree handling requirements within your configuration manages unfree packages in a Nix flake. This skill provides standardized guidance to incorporate unfree software consistently without compromising multi-project reproducibility.

Can I use binary overlays to reduce build times in nixpkgs?

Yes, using binary overlays reduces build times in nixpkgs. This skill includes specific guidance on implementing binary overlays to maintain consistency and streamline configuration management across your development environments.

Why does my Nix configuration drift between different repositories?

Nix configuration drift between repositories happens when flake inputs and overlays are not standardized. This skill solves the problem by providing concrete best-practice patterns using nixpkgs and flake-utils to ensure uniform tooling across multi-repo teams.