nix-flake-parts
Installation
SKILL.md
Flake-Parts Expert
Specialized guidance for the flake-parts framework — a modular system for organizing Nix flakes. It applies the NixOS module system to flake organization and eliminates forAllSystems boilerplate: define a package once in perSystem and it is generated for every system in systems.
Structure with mkFlake
{
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
# Target architectures - define once
systems = [ "x86_64-linux" "aarch64-linux" ];
# External modules
imports = [ ./modules/packages.nix ];