nix-flake-parts

Community

Modular Nix flakes, consistent dev environments.

Authoraitchwhy
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill standardizes Nix flake architecture using flake-parts and git-hooks.nix, enabling modular composition, reproducible development shells, and integrated pre-commit hooks for all projects. It simplifies complex flake management and ensures consistent tooling.

Core Features & Use Cases

  • Modular Flake Structure: Guides on organizing flake.nix with separate modules for devshells, Darwin, and NixOS configurations, promoting clean separation of concerns.
  • perSystem & withSystem: Patterns for accessing system-specific contexts and packages, replacing the deprecated forAllSystems helper for improved clarity and type safety.
  • Integrated Pre-commit Hooks: Configures git-hooks.nix for automatic formatting (nixfmt-rfc-style), linting (deadnix, statix), and static analysis within the development shell.
  • Use Case: A developer needs to create a new Nix project that supports both macOS and Linux development. They can use this skill to set up a flake-parts based flake.nix, define a devShells.nix with pre-commit hooks, and add system-specific configurations for both platforms.

Quick Start

Migrate the existing 'flake.nix' to use 'flake-parts', moving the development shell definition to 'flake/devshells.nix' and integrating 'nixfmt-rfc-style' as a pre-commit hook.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: nix-flake-parts
Download link: https://github.com/aitchwhy/dotfiles/archive/main.zip#nix-flake-parts

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.