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.