一键导入
nixos-build
Validate NixOS configuration changes by running nh os build and interpreting errors
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Validate NixOS configuration changes by running nh os build and interpreting errors
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | nixos-build |
| description | Validate NixOS configuration changes by running nh os build and interpreting errors |
| compatibility | opencode |
After making changes to any .nix files in this repository, run nh os build to validate the configuration evaluates and builds without errors.
git add -AN
nh os build
Run from the repo root (/home/vidhanio/Projects/vidhanix). The build typically takes 10–60 seconds.
Important: Always stage relevant files with git add before running nh os build. The build uses staged files, so unstaged changes won't be included. Usually git add -AN is appropriate, but you can stage specific files/directories with intent-to-add if needed (e.g., git add -N modules/programs/neovim/).
✔ nixos-system-... and a SIZE / DIFF summary. No action needed.error: ...): a Nix expression is invalid. Read the error trace to find the offending file and line, fix it, and re-run.path '...' does not exist): a relative path to a secret or file is wrong. Count the directory depth of the referencing .nix file relative to the repo root and correct the ../ prefix count so it resolves to secrets/<name>.age at the repo root.The option ... does not exist / is not of type): a Home Manager or NixOS option is misused. Check the module definition and fix the value or type.Use this skill any time .nix files are created or modified — especially when touching:
age.secrets.*.file pathsconfig blocksperSystem expressionsmodules/Always run before declaring a task complete.