nix-build-optimization

Community

Accelerate Nix builds, slash CI/CD times.

Authoraitchwhy
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Slow Nix builds and frequent CI/CD cache misses can severely hinder development velocity. This Skill provides fundamental patterns to optimize build times, ensure efficient caching, and streamline your CI/CD pipeline for any TypeScript/Nix project.

Core Features & Use Cases

  • Derivation Splitting: Separates stable inputs (dependencies) from volatile inputs (source code) to maximize cache hits and reduce rebuild times.
  • Multi-Layer Caching: Leverages Cachix (remote binary cache), Magic Nix Cache (GitHub Actions store persistence), and package manager caches for comprehensive optimization.
  • CI/CD Integration: Provides GitHub Actions patterns for fast, reliable Nix builds and container image creation with nix2container, ensuring consistent and rapid deployments.
  • Use Case: A developer is experiencing 25-minute CI/CD builds for a TypeScript/Nix project. They can use this skill to refactor their flake.nix to split derivations and integrate caching, reducing warm build times to under 2 minutes.

Quick Start

Analyze the 'flake.nix' file in the current repository and apply derivation splitting to optimize build times for a TypeScript/Bun project.

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-build-optimization
Download link: https://github.com/aitchwhy/dotfiles/archive/main.zip#nix-build-optimization

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.