using-flake-parts

Guide Nix flake migration to flake-parts for modular multi-system builds.

5|Updated Mar 18, 2024
One-click install
npx skills add https://github.com/Multipixelone/infra --skill using-flake-parts-multipixelone
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-flake-parts
Source: https://github.com/Multipixelone/infra/tree/main/docs/skills/using-flake-parts
Command: npx skills add https://github.com/Multipixelone/infra --skill using-flake-parts-multipixelone

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides expert guidance on using the flake-parts framework to organize Nix flakes, simplifying multi-system builds and promoting modularity.

Core Features & Use Cases

  • Modular Flake Organization: Structure Nix flakes efficiently using the flake-parts system.
  • Multi-System Builds: Define packages and configurations once for automatic generation across multiple systems.
  • Use Case: You are migrating a complex Nix flake to a more modular structure using flake-parts and need to understand how to define perSystem configurations, manage module arguments, and leverage features like easyOverlay.

Quick Start

Use the using-flake-parts skill to understand how to convert a standard Nix flake to use flake-parts.

Frequently Asked Questions about using-flake-parts

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

FAQPage Schema
How do I organize a Nix flake for multi-system builds using flake-parts?

flake-parts allows you to define perSystem configurations to generate packages across multiple systems automatically. This modular framework structure simplifies multi-system output management.

What is the best way to migrate a standard Nix flake to flake-parts?

Migrating to flake-parts involves restructuring standard Nix flakes into modular configurations. You transition outputs to perSystem definitions and manage module arguments to leverage the framework's enhanced modularity.

How does easyOverlay work in nix flake configurations?

easyOverlay is an advanced flake-parts feature for managing Nix overlays within modular configurations. It automatically generates overlay logic alongside your perSystem outputs.

When do I need to use partitions in flake-parts?

Partitions are an advanced flake-parts feature used when managing highly complex Nix flakes. They allow you to divide modular configurations into isolated segments for better organization.

How do I manage module arguments when using flake-parts?

Module arguments in flake-parts are managed through the framework's module system. This allows perSystem configurations to access necessary context and variables across multiple systems.

Can I use flake-parts to replace standard NixOS configuration management?

flake-parts enhances NixOS configuration management by providing modular structure for flakes. It organizes configurations and simplifies multi-system builds, while standard NixOS modules handle the actual system setup.