andresgongora/agent-config/nixos
Claude Code and agent skill by andresgongora/agent-config
- community
Checking that the SKILL.md file is still in the repository.
Ready-to-run NixOS commands: missing CLI tool, prebuilt binary failing with missing shared library or dynamic linker, package/option lookup, non-activating rebuild validation. Load when work touches NixOS/Nix (flake, pkgs, home-manager) or command fails and environment is NixOS (e.g. /etc/os-release ID=nixos).
Install
npx vskill@latest install andresgongora/agent-config/nixosSKILL.md
The same SKILL.md was published earlier as andresgongora/agent-config/nixos.
Symptom → command. No Nix theory. Unblock, do not mutate system state.
<nix-repo> defaults to ~/.nix unless otherwise specified.
Core rules
- Missing tool: run ephemerally (see Boundaries for the no-config-edit rule).
- Prefer an already-installed alternative first (
rg/grep,fd/find,jq). Only fetch a package when it is the clean tool for the job. - Binary fails on library/linker: assume non-FHS layout, not a missing distro package. Never hunt apt/dnf package names.
- Config change: validate by building.
switch/boot/testonly on explicit user request. - Search option and package names; never guess them.
- Append
--show-traceto any failing Nix eval/build. - Dry-run (
--dry-run) is costly (time, disk); never run speculatively or "just to check." Run it only when no other way verifies correctness (e.g. distinguishing between candidate fixes). Otherwise propose it as a next step and let the user decide.
Troubleshooting
Tool missing or not installed
Run without installing:
- Preferred solution:
nix shell nixpkgs#PKG -c CMD ARGS - Legacy fallback:
nix-shell -p PKG --run 'CMD ARGS'(quote whole command). - Multiple tools:
nix shell nixpkgs#PKG1 nixpkgs#PKG2 -c CMD.
Binary fails
Load FHS environment if: error while loading shared libraries, missing interpreter/dynamic linker, or No such file or directory on an ELF that exists.
- Preferred solution:
fhs -c "CMD ARGS". Example foruv(don't use python directly):fhs -c "uv run ...". - Fallback if
fhsfails:nix run nixpkgs#steam-run -- CMD ARGS. - Still failing on one specific library: add it to that module's
targetPkgsonly if the need is persistent.
Need package or option name
- Run:
nix search nixpkgs QUERY. - Sources:
- Packages: https://search.nixos.org/packages
- NixOS options: https://search.nixos.org/options
- Home Manager options: https://home-manager-options.extranix.com
Eval error hard to read
- Run:
nix repl && :lf <nix-repo>. - Then inspect attributes directly.
Don't know HOST name
- Run:
nix flake show --json | jq -r '.nixosConfigurations | keys[]'. - Alternative: list
<nix-repo>/nixos/hosts/*.nix, then inspectconfig.system.hostNameattribute in each file.
Deployment wants unexpected local builds
- List exact derivations before activation.
- Only when distinguishing candidate fixes (costly; otherwise propose it as a next step): run
nix build .#nixosConfigurations.HOST.config.system.build.toplevel --dry-run --print-build-logs.
Trace one listed derivation to its owner
- Run:
``bash TOP_DRV=$(nix eval --raw .#nixosConfigurations.HOST.config.system.build.toplevel.drvPath) nix why-depends "$TOP_DRV" /nix/store/HASH-PACKAGE.drv ``
- Never type a
.drvhash from memory or guesswork. - Separately evaluated package attributes may differ after overrides.
AppImages
AppImage won't run, complains about FUSE, or fails inside fhs with a library missing from its baseline set:
- Extract instead of running the AppImage directly — avoids the FUSE dependency NixOS doesn't provide by default:
fhs -c "'/path/to.appimage' --appimage-extract", then run the extractedAppRuninsidefhs. - Missing library not in
fhs's baselinetargetPkgs: get its store path withnix eval --raw nixpkgs#PKG.outPathand prepend<path>/libtoLD_LIBRARY_PATHwhen launchingAppRuninsidefhs. - Bundled script does both steps and caches the extraction:
scripts/run-appimage.sh <path-to-appimage> [nixpkgs#lib-attr ...].
Boundaries
- No activation: no
switch,boot,test,--install-bootloaderwithout explicit user request. - No config edit to satisfy a one-off tool need.
- No
flake.lockmutation outside a task whose stated goal is a version change. - Generic Linux/app failure with no NixOS cause: drop this playbook, debug normally.
- Unpredicted behavior: stop, tell user. Do not silently keep retrying.
Verification
- [ ] Command run matches an instruction above verbatim, with only placeholders (
PKG,CMD,HOST) substituted with real, sourced values. - [ ] Any
.drvor store path used was copied from actual command output, never typed from memory. - [ ] Config change: validated by a rebuild that exited 0, when the user asked for validation.
- [ ] No
--dry-runexecuted unless required by the task's own correctness check or explicitly requested; otherwise propose as a next step instead. - [ ] No
switch/boot/test/--install-bootloaderran without explicit user request.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/nixos/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/andresgongora/agent-config/nixos)