nix-update
Update Nix flake inputs.
- License 许可
- CC-BY-4.0
- 最近更新
- 2026-10-18
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- nix-update
- metadata
- { "author": "Gemini CLI" }
- description
- Update Nix flake inputs.
02 资源文件 1
- 脚本scripts/nix-update.sh1.2 KB
03 SKILL.md 正文
Nix Update
This skill provides a robust way to update all flake inputs of a Nix project iteratively. Unlike a bulk nix flake update, this skill verifies each input's update independently to ensure stability. If a check fails, the specific input update is reverted while others continue. Use this when you want to safely update all flake dependencies one by one
Core Logic
For every root input in the flake.lock:
- Backup: Create a temporary backup of
flake.lock. - Update: Run
nix flake update <input_name>. - Validate: Run
nix flake checkto ensure the flake remains in a valid state. - Commit/Revert:
- If validation succeeds: Keep the change and track it as successful.
- If validation fails: Restore
flake.lockfrom backup and track it as failed.
- Summary: At the end of the script, a clear summary of all successful and failed updates is printed to the terminal.
Usage
Execute the update script from the project root:
bash .agents/skills/nix-update/scripts/nix-update.sh
Dependencies
nix: The Nix package manager with flakes enabled.jq: Required to parse the flake inputs.bash: Required to run the automation script.
Troubleshooting
nix flake checkfails due to formatting: Becausenix flake checktypically executestreefmt(or similar formatters) to verify repository-wide format compliance, having unformatted, modified files (even non-nix files like this shell script) in the working tree will cause the check to fail. Solution: Runnix fmtbefore running this script to ensure all files in your repository meet the formatting standards.
04 同仓库更多 Skills
vorburger-profile
Provides personal and professional information about Michael Vorburger.
typescript-conventions
Enforces TypeScript and project-specific coding standards, including Bun usage and the zero-warning policy. Use this skill when creating or modifying any TypeScript or configuration files.
testing
Guidelines for determining how to test a project based on its contents.
skills
Rules for Agent Skills files.
scripting
Conventions for writing and executing scripts (TS, Bash, etc.).
preferred-tools
Preferred tools for common tasks like linting and link checking.