Agent skill
upgrade-flake
Update flake.lock to get latest packages within the current NixOS release - runs nix flake update, checks build, and optionally applies
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/upgrade-flake-richardgill-nix
SKILL.md
Upgrade Flake Inputs
Update flake.lock to pull in the latest commits from all flake inputs. This gets you newer package versions without changing NixOS release channels.
What this does
- Updates all inputs to their latest commits (nixpkgs, home-manager, etc.)
- Does NOT change release channels (stays on same NixOS version)
- Safe operation - can always rollback
Process
-
Update the lock file
bashjust updateThis runs
nix flake updateand updatesflake.lock. -
Build and verify (safe dry-run)
bashjust checkBuilds all configurations without applying. If this fails, fix errors before proceeding.
-
Apply the update (when ready)
bashjust switch -
Verify services are running
bashsystemctl status docker tailscaled
Rollback if needed
When you're done echo out the instructions to:
# Revert to previous system generation
sudo nixos-rebuild switch --rollback
# Revert flake.lock to previous state
git checkout flake.lock
Tips
- show the user what ch
git diff flake.lockto see what changed before applying - Old boot entries remain available for rollback until garbage collected
$ARGUMENTS
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?