| name | nix-blueprint |
| description | numtide/blueprint — Nix flake framework that maps a fixed directory structure to flake outputs with zero glue code. Apply when a repo's flake.nix calls `inputs.blueprint { ... }`; when deciding where a package, devshell, host, module, check or template file must live; when a package/devshell/host is missing from `nix flake show` or `nix build` says the attribute doesn't exist; when adding the `prefix` option; when writing packages/<name>/default.nix, devshell.nix or modules/<class>/<name>.nix. Do NOT use for generic Nix flakes without blueprint (hand-written outputs, flake-parts, flake-utils), for nixpkgs contributions, or for NixOS module semantics unrelated to file placement. Prefer nix-project-scaffold for creating a NEW project, nix-treefmt-formatter for formatter.nix internals, and nixos-host-provisioning for adding hosts with disko/facter. |
| user-invocable | true |
| license | MIT |
| compatibility | Designed for Claude Code, Codex or similar harness, and for projects using Nix flakes with numtide/blueprint. |
| metadata | {"author":"aldoborrero","version":"1.0.0","openclaw":{"emoji":"🧭","homepage":"https://github.com/aldoborrero/cc-skills-nix","requires":{"bins":"[Truncated]"},"install":[]}} |
| allowed-tools | Read Edit Write Glob Grep Bash(nix:*) Bash(git:*) Agent |
| paths | ["**/flake.nix","**/*.nix"] |
numtide/blueprint
Blueprint generates all flake outputs from the directory layout. The structure IS the API: there is no place to "register" an output — you create a file at the right path and the output exists. Source of truth for every mapping below: lib/default.nix in numtide/blueprint.
A blueprint flake.nix is ~10 lines and rarely changes:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
blueprint.url = "github:numtide/blueprint";
blueprint.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs: inputs.blueprint {
inherit inputs;
prefix = "nix"; # optional: load tree from ./nix/ instead of repo root
# systems = [ "x86_64-linux" ]; # default: x86_64-linux, aarch64-linux, x86_64-darwin, aarch64-darwin
# nixpkgs.config.allowUnfree = true; # forces a fresh nixpkgs import per system
# nixpkgs.overlays = [ ... ];
};
}
With prefix = "nix" every path below lives under nix/ (e.g. nix/packages/foo/default.nix); without it, at the repo root. Convention observed in real repos: application/library projects use prefix = "nix" to keep Nix out of the way; NixOS/system config repos skip the prefix since the whole repo is Nix.
Directory → output map (condensed)
| Path (under prefix) | Flake output |
|---|
devshell.nix | devShells.<sys>.default |
devshell.toml | devShells.<sys>.default (needs devshell input) |
devshells/<name>.nix or devshells/<name>/default.nix | devShells.<sys>.<name> |
devshells/<name>.toml | devShells.<sys>.<name> (needs devshell input) |
package.nix | packages.<sys>.default |
packages/<name>.nix or packages/<name>/default.nix | packages.<sys>.<name> + checks.<sys>.pkgs-<name> |
formatter.nix | formatter.<sys> (also registered as ) |