nixcf-flake-package

Manages flake inputs and external packages in the nixcf NixOS repository with controlled lockfile updates.

Updated Jun 23, 2024
One-click install
npx skills add https://github.com/lifeich1/nixcf --skill nixcf-flake-package-lifeich1
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nixcf-flake-package
Source: https://github.com/lifeich1/nixcf/tree/main/.agents/skills/nixcf-flake-package
Command: npx skills add https://github.com/lifeich1/nixcf --skill nixcf-flake-package-lifeich1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Changing flake inputs or external packages in a NixOS flake repository risks broad lockfile churn, broken follows relationships, architecture regressions, and unclear ownership between overlays, modules, and consumers. This Skill enforces a disciplined workflow for adding, pinning, updating, or removing inputs safely. ## Core Features & Use Cases - Controlled input changes: Traces each input through flake.nix, flake.lock, module package options, and host/Home Manager consumers before editing. - Authorization gating: Requires explicit approval before mutating flake.lock, running network-fetching commands, or accepting unexpected transitive churn. - Architecture-aware validation: Evaluates every affected nixosConfigurations toplevel for both x86_64-linux and aarch64-linux targets, plus just chk and diff checks. - Use Case: When adding a new external flake package to the GTR7 desktop and Pi4B homelab, the Skill selects the correct integration path (module import, direct package consumption, or typed package option), reconciles the lock narrowly, and validates both architectures. ## Quick Start Use the nixcf-flake-package skill to add a new flake input and wire its package into the Pi4B Home Manager profile without touching unrelated lock entries.

Frequently Asked Questions about nixcf-flake-package

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

FAQPage Schema
How do I add a new flake input to a NixOS configuration?▼

Declare the input in flake.nix with its source, ref, and follows relationships, then reconcile flake.lock using the currently documented Nix lock command. Wire the package through a typed module package option or direct packages.<system>.<output> consumption, and validate each affected host configuration.

How to update a single flake input without changing the whole lockfile?▼

Use the current supported named-input update form of nix flake update or nix flake lock targeting only that input. Compare the before and after input graph and git diff to confirm only the named node and explainable transitive nodes changed.

Should I use an overlay or a module package option for external flake packages?▼

Prefer a typed package option in the owning os/ or fool/ module with the input package injected at the enablement site. Add an overlay only when a stable global pkgs.<name> API is genuinely required, and document the owning option and every consumer.

Does a package working on x86_64-linux guarantee it works on aarch64-linux?▼

No. A successful x86_64 output does not establish Raspberry Pi availability. Probe the exact packages.<system>.<output> for each target system and evaluate every affected nixosConfigurations toplevel before considering the change validated.

Why should flake.lock never be edited by hand?▼

Hand edits break the resolved revision graph and transitive input relationships that Nix maintains. Always mutate the lock through Nix commands, and stop to ask before accepting unrelated top-level changes or surprising source and ref changes.