AGENT SKILL
更新 Nix flake 输入
nix-update
更新 Nix flake 的输入。
适用职业软件开发工程师
使用场景开发环境与工具链管理
- 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
Michael Vorburger 个人资料
vorburger-profile
提供关于 Michael Vorburger 的个人及职业信息。
★ 0
TypeScript 编码规范
typescript-conventions
强制执行 TypeScript 及项目特定的编码标准,包括 Bun 的使用和零警告策略。在创建或修改任何 TypeScript 或配置文件时使用此技能。
★ 0
项目测试方案制定
testing
根据项目内容确定如何进行测试的指南。
★ 0
Agent Skills 文件规范
skills
Agent Skills 文件的编写规则。
★ 0
脚本编写与执行规范
scripting
编写和执行脚本(TS、Bash 等)的约定规范。
★ 0
常用任务首选工具
preferred-tools
代码检查(linting)、链接检查等常见任务的首选工具。
★ 0