Upgrade Flake Inputs

VerifiedSafe

Updates flake.lock to the latest commits for all flake inputs without changing the NixOS release channel. It runs nix flake update, then optionally builds and verifies before applying. Use this to get newer package versions while staying on the same NixOS version.

Sby Skills Guide Bot
DevelopmentBeginner
506/2/2026
Claude Code
#nixos#flake#update-dependencies#nix-flake-update

Recommended for

Our review

This skill updates the flake.lock file of a NixOS project to pull in the latest commits from all flake inputs, keeping you on the same release channel.

Strengths

  • Safe operation with rollback capability
  • Verification step before applying
  • Updates all inputs with a single command

Limitations

  • Does not change the NixOS major version
  • May require manual fixes if build errors occur
When to use it

Use this skill when you want to refresh your NixOS configuration dependencies without upgrading the release channel.

When not to use it

Do not use this for NixOS major version upgrades (use 'upgrade-nixos') or if you prefer to update a single input selectively.

Security analysis

Safe
Quality score92/100

The skill runs standard NixOS package update commands via just recipes, with no destructive or exfiltrating actions. No external code execution or security bypass.

No concerns found

Examples

Update all flake inputs
Update flake.lock to get the latest packages from all inputs, then check the build and apply if successful.
Safe dry-run update
Run nix flake update to refresh flake.lock, then git diff to see changes, but do not apply.

name: upgrade-flake description: | This skill updates flake.lock to get latest packages within current NixOS release. Triggers: "update flake", "upgrade flake", "nix flake update", "bump flake.lock", "update flake inputs", "refresh inputs", "update dependencies". Runs nix flake update, checks build, optionally applies. Not for NixOS release upgrades (use upgrade-nixos for major version changes).

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

  1. Update the lock file

    just update
    

    This runs nix flake update and updates flake.lock.

  2. Build and verify (safe dry-run)

    just check
    

    Builds all configurations without applying. If this fails, fix errors before proceeding.

  3. Apply the update (when ready)

    just switch
    
  4. Verify services are running

    systemctl 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.lock to see what changed before applying
  • Old boot entries remain available for rollback until garbage collected

$ARGUMENTS

Related skills