nixcf-secrets-agenix

Audits and rewires Agenix-managed secrets in the nixcf NixOS flake without exposing plaintext.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Managing Agenix secrets in a NixOS flake risks leaking plaintext into the Nix store, Git history, logs, or chat output. This Skill enforces a strict no-plaintext workflow for auditing and modifying secret declarations, recipient mappings, and runtime wiring in the nixcf repository. ## Core Features & Use Cases - Safety-gated inspection: A bundled shell script checks for tracked plaintext credential files and blocks all repo-consuming Nix commands until the gate passes. - Classified request handling: Every task is classified as audit, declaration/runtime wiring, recipient change, credential rotation, or Git-history remediation, with explicit authorization gates before material actions. - Cross-layer credential tracing: Maps the full chain from logical secret to encrypted payload, recipients, age.secrets declarations, runtime paths, and consumers, including the Attic client/server/netrc path across Home Manager, NixOS, and the Pi host. - Use Case: When adding a new Agenix secret for a service, the Skill wires the declaration and consumer with least-privilege ownership, then hands the actual encryption step to the user in a trusted local session. ## Quick Start Ask the agent to audit the Agenix secret declarations and their consumers in this repository without reading any encrypted payload contents.

Frequently Asked Questions about nixcf-secrets-agenix

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

FAQPage Schema
How do I safely rotate an Agenix secret in a NixOS flake?▼

Finish the structural wiring first, then have the user run agenix -e or rekey locally in a trusted session and report only success or failure. The agent never sees plaintext; it validates names, recipient mappings, and Nix evaluation afterward.

How do I change Agenix recipients in secrets.nix?▼

Edit the public-key mapping in secrets/secrets.nix for the affected payloads, then every affected .age file must be rekeyed by the user. The Skill treats recipient changes as a distinct class requiring explicit authorization.

Can the agent read or decrypt .age secret files?▼

No. The Skill forbids decrypting, printing, diffing, or checksumming any .age payload, and blocks commands like agenix -e, cat, or strings against secret files. Only filenames, metadata, and recipient identities are inspected.

What happens when the source-safety gate fails?▼

A nonzero result is a hard stop: no Nix evaluation, build, check, or deployment commands may run, and flagged credential-bearing files must not be opened. Work continues only with filename metadata and non-secret sources until remediation.

Does deleting a leaked secret file fix Git history exposure?▼

No. Removing a file from the current tree does not remediate history. The Skill separates remediation into authorized steps: remove plaintext wiring, rotate the credential, assess Nix-store and log exposure, then plan a coordinated history rewrite.