update-flake-input

Update versioned flake inputs in flake.nix to latest tagged versions.

8|1|Updated Oct 21, 2015
One-click install
npx skills add https://github.com/iamruinous/nix-config --skill update-flake-input
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-flake-input
Source: https://github.com/iamruinous/nix-config/tree/main/.opencode/skills/update-flake-input
Command: npx skills add https://github.com/iamruinous/nix-config --skill update-flake-input

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually updating versioned flake inputs is error-prone and time-consuming; this skill automates the process end-to-end.

Core Features & Use Cases

  • Query latest tags from source repositories (Forgejo/GitHub) for versioned inputs.
  • Compare with the current version in flake.nix and update only when newer.
  • Update flake.nix, refresh the flake.lock, and verify the build to ensure upgrades are safe.
  • Use across multiple projects to keep all configured inputs current with minimal manual intervention.

Quick Start

Run /update-flake-input <name> to refresh a single versioned input or use all to update all inputs.

Frequently Asked Questions about update-flake-input

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically update versioned Nix flake inputs to the latest tag?

You can automatically update Nix flake inputs by querying source repositories for the latest tags, comparing versions, and modifying flake.nix and flake.lock. This process ensures inputs are current with minimal manual intervention.

What is the best way to keep multiple flake.nix inputs updated across different projects?

Keeping multiple flake.nix inputs updated is done by running an automated refresh across all configured inputs. It queries sources, updates only when newer versions exist, and validates the build to ensure safe upgrades across projects.

Do I need specific tools installed to automate flake input version updates?

Yes, automating flake input updates requires nix, curl, and jq installed. These tools perform source queries, fetch latest tags, and compare versions to safely modify your flake configuration.

How does automating flake updates prevent build failures when upgrading inputs?

Automating flake updates prevents build failures by validating the build after refreshing flake.lock. This ensures the newly tagged versions are safely integrated and the upgrade does not break your environment.

Can I update just a single versioned input in my flake.nix instead of all of them?

Yes, you can update a single versioned input in flake.nix by specifying the input name. This targets only that specific source, compares its current version, and updates it independently of other configured inputs.

Why does updating flake.lock manually cause version mismatch errors?

Updating flake.lock manually causes version mismatch errors because human intervention often skips validating the build against the new tag. Automating this enforces an auditable workflow that compares versions and verifies compatibility.