Skip to content
Back to skills

Upgrade Flake

ASecurity

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).

  • 38 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 8, 2026
devopsbashdockergit

Security analysis

A100/100

Scanned September 8, 2026

npx -y skills add richardgill/nix --skill upgrade-flake --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Upgrade Flake?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Upgrade Flake
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/richardgill-upgrade-flake/badge)](https://www.skillsdirectory.com/skills/richardgill-upgrade-flake)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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**
   ```bash
   just update
   ```
   This runs `nix flake update` and updates `flake.lock`.

2. **Build and verify** (safe dry-run)
   ```bash
   just check
   ```
   Builds all configurations without applying. If this fails, fix errors before proceeding.

3. **Apply the update** (when ready)
   ```bash
   just switch
   ```

4. **Verify services are running**
   ```bash
   systemctl status docker tailscaled
   ```

## Rollback if needed
When you're done echo out the instructions to:
```bash
# 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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in devops →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.