nixcf-module-change

Implements and validates scoped NixOS and Home Manager module changes in the nixcf repository.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Making changes to a multi-host NixOS flake repository is error-prone: it is easy to put reusable logic in host-specific files, break other machines' configurations, or accidentally expose secrets. This Skill routes every change through the correct host/profile/module boundary and validates all affected configurations. ## Core Features & Use Cases - Change Routing: Directs edits to the right location — host/<hostname>/ for machine-specific settings, home/<profile>/ for user features, os/ and fool/ for reusable modules. - Module Implementation: Enforces repository conventions such as fool.* option namespaces, lib.mkIf guards, and explicit package injection at enablement sites. - Safety Guardrails: Blocks secret plaintext exposure, prevents unauthorized flake input updates or deployments, and gates Nix commands behind a source-safety check script. - Use Case: When adding a new Home Manager feature shared by the GTR7 desktop and XPS13 laptop, the Skill creates a reusable fool/<name>/ module, wires its imports, enables it in both profiles, updates the relevant readme files, and runs just chk to validate. ## Quick Start Use the nixcf-module-change skill to add a new fool.* Home Manager module and enable it for the XPS13 profile, then validate the change.

Frequently Asked Questions about nixcf-module-change

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

FAQPage Schema
How do I add a reusable Home Manager module in a NixOS flake repository?▼

Create a default.nix under fool/<name>/ declaring an option in the fool.* namespace with lib.mkIf guards, import it from fool/default.nix, then enable it from the relevant home/<profile>/default.nix. Update the module and parent readme files to document the new option.

How do I decide where a NixOS configuration change belongs?▼

Machine-specific hardware and system switches go in host/<hostname>/, user feature selection goes in home/<profile>/, and reusable behavior shared by multiple machines goes in os/ or fool/ modules. Move shared logic out of host files instead of copying it.

Can this Skill update flake inputs or deploy configurations?▼

No. It explicitly forbids updating flake inputs or flake.lock, deploying, creating tags, or committing unless the user explicitly authorizes that action. Validation is limited to git diff --check and just chk after the source-safety gate passes.

How are secrets handled when changing NixOS modules?▼

The Skill never decrypts, prints, or moves secret plaintext. It runs a source-safety check script before opening potential credential sources and uses the repository's Agenix declarations and runtime paths when a module needs a credential.

What validation runs after a NixOS module change?▼

Every change gets git diff --check, and Nix configuration changes run just chk (nix flake check) only after the source-safety gate succeeds. If validation cannot complete, the exact failure and unverified configurations are reported instead of claiming success.