com um clique
impermanence-audit
Audit NixOS impermanence configuration — find files on root filesystem not covered by persistence declarations. Use when the user wants to check for untracked files, audit impermanence, or runs /impermanence-audit.
Menu
Audit NixOS impermanence configuration — find files on root filesystem not covered by persistence declarations. Use when the user wants to check for untracked files, audit impermanence, or runs /impermanence-audit.
Universal coding standards, best practices, and patterns. Use when developing in any language — triggers on TypeScript, JavaScript, React, Node.js, Python, Nix, ruff, pyright, pytest, uv, flake.nix, justfile, just, recipes, and general code quality topics.
Use when writing git commit messages, reviewing commits, or setting up commit conventions. Triggers on commit, git commit, commit message, changelog, semantic versioning.
A formal evaluation framework for Claude Code sessions, implementing eval-driven development (EDD) principles.
Docker-in-Docker with network_mode host for multi-node simulation
Use when implementing LangGraph workflows that need to pause for user input or external confirmation before continuing execution
Workaround for @nuxt/eslint not auto-detecting TypeScript, causing vue-eslint-parser to fail on <script lang="ts"> blocks
| name | impermanence-audit |
| description | Audit NixOS impermanence configuration — find files on root filesystem not covered by persistence declarations. Use when the user wants to check for untracked files, audit impermanence, or runs /impermanence-audit. |
| allowed-tools | Bash(sudo:*), Bash(bash:*), Bash(nix:*), Read, Edit, Glob, Grep |
Scan the root filesystem and identify files not covered by NixOS impermanence persistence declarations. These files would be lost on reboot.
sudo impermanence-audit --hostname stella
Options:
--hostname NAME — NixOS host config to evaluate (default: $(hostname))--user NAME — user home to check (default: current user)--ignore FILE — extra ignore patterns file--json — machine-readable outputReview the untracked files and categorize them:
| Category | Action |
|---|---|
| Application state/config | Add to the appropriate feature module's environment.persistence |
| Transient/cache files | Safe to ignore — add to ~/.config/impermanence-audit/ignore if noisy |
| System service data | Add to the system module (usually features/system/boot.nix) |
| Unknown | Investigate what created the file before deciding |
Persistence paths are declared across feature modules. Match the file to its feature:
| Path pattern | Module file |
|---|---|
Desktop app configs (~/.config/app, ~/.local/share/app) | flake-modules/modules/features/desktop/common.nix |
Dev tools (~/.kube, .local/share/direnv, etc.) | flake-modules/modules/features/devpack/tools.nix |
Editor data (~/.local/share/nvim) | flake-modules/modules/features/devpack/editor.nix |
System services (/var/lib/*, /etc/*) | flake-modules/modules/features/system/boot.nix |
| KDE state | flake-modules/modules/features/desktop/kde.nix |
| Steam/gaming | flake-modules/modules/features/desktop/steam.nix |
| Browser profiles | flake-modules/modules/features/desktop/zen.nix |
The pattern for adding a user directory to a feature module:
# Inside the module's config block, guarded by impermanence check:
config = lib.mkIf (cfg.enable && config.my.system.impermanence.enable) {
environment.persistence."/persistent/system".users."efficacy38" = {
directories = [
".config/new-app"
".local/share/new-app"
];
};
};
For system-level paths:
environment.persistence."/persistent/system" = {
directories = [
"/var/lib/new-service"
];
};
After adding persistence declarations:
nh os switch --hostname=stella
Then re-run the audit to confirm the paths are now covered.