Nixpkgs Patched logo

Nixpkgs Patched

CommunityPopular
ryan4yin
nixpkgs-patched

Use when temporarily carrying an unmerged nixpkgs pull request or commit in the personal ryan4yin/nixpkgs fork, updating the nixos-unstable-patched branch, or consuming that branch from this nix-config flake, including a WORKAROUNDS.md row whose removal condition is carrying the patch.

Overview

Publisherryan4yin
Repositorynix-config
Skill namenixpkgs-patched
Stars
2.1K
Forks
104
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ryan4yin on GitHub. Read the source before you install it.

Installation

Install the Nixpkgs Patched AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ryan4yin/nix-config/tree/main/.agents/skills/nixpkgs-patched
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ryan4yin/nix-config.git /tmp/nix-config
mkdir -p .claude/skills
cp -r /tmp/nix-config/.agents/skills/nixpkgs-patched .claude/skills/nixpkgs-patched
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Nixpkgs Patched in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Nixpkgs Patched on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Nixpkgs Patched is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Carrying a nixpkgs patch

This is a temporary supply-chain change across two repositories:

text
upstream nixpkgs PR → personal fork branch → nix-config lock entry → host/package validation

Keep the upstream commit identifiable, keep a rollback ref, and never activate a host merely because the fork branch pushed successfully.

1. Confirm the exact target

Before changing either repository, confirm the remotes, branch, PR commits, and local work:

bash
git remote -v
git status --short
git branch --show-current
git fetch origin nixos-unstable
git fetch fork nixos-unstable-patched
gh pr view <pr> --repo NixOS/nixpkgs --json state,baseRefName,commits

The intended fork is ryan4yin/nixpkgs and the intended branch is nixos-unstable-patched. In ~/src/nixpkgs, origin is NixOS/nixpkgs and the fork is fork (or ryan4yin); never push the patched branch to origin. Confirm the names; do not infer a remote from its position in the list.

2. Refresh the patched branch

Do this in the nixpkgs checkout (~/src/nixpkgs), preserving any existing work:

  1. Save a rollback ref to the current patched tip.
  2. Align the branch with the current origin/nixos-unstable.
  3. Cherry-pick the exact PR commit(s), using -x so the upstream source remains recorded.
  4. Resolve conflicts deliberately and inspect the complete diff against upstream.

If alignment rewrites the remote branch, this is an impactful GitHub operation: preview the new history and push only with --force-with-lease, never --force. Stop if the remote changed in an unexpected way. An upstream PR targets master unless it says otherwise, while the patched branch tracks nixos-unstable; confirm the PR's base commit is contained in nixos-unstable before cherry-picking, and stop if the patch depends on unreleased changes. If the PR depends on another PR, review both changes and record their order.

3. Validate before publishing

For a local patched-branch update, validate only the package(s) the user intends to use. Use normal Nix commands from the nixpkgs checkout, such as nix build .#<package> or a specifically requested passthru.tests.<name>. These commands build their required dependencies; do not separately build or test unrelated packages just because they changed on the branch.

nixpkgs-review is for reviewing an upstream nixpkgs PR. Do not use it to validate ordinary local package use or a patched-branch lock update. For this workflow, inspect the diff and commit list:

bash
git diff --check
git log --oneline --decorate origin/nixos-unstable..HEAD

Run package builds or tests only when the user requests them or when the selected package is needed to complete the requested local verification. Record which package and checks were actually run; never imply that unrelated packages or platforms were covered.

4. Publish and consume it

After authorization and validation:

bash
git push --force-with-lease fork nixos-unstable-patched
git ls-remote fork refs/heads/nixos-unstable-patched

Then in this repository, update only the patched input and inspect the lock diff:

bash
nix flake update nixpkgs-patched
git diff -- flake.lock
just test
just eval-host <affected-host>
just build-host <affected-host>

The nix-config eval and host-build commands validate this configuration. They are not a reason to build every package in the patched nixpkgs branch. Run a host build only for a host that consumes the changed package and only when the user asks for that validation.

Keep the nixpkgs fork change, lock update, and unrelated configuration changes separate. Do not run just niri, just local, or a remote deployment from this skill; activation is a separate authorized step in nix-config-update.

5. Roll back

If validation fails, restore the fork branch from the saved ref, update the lock back to the previous revision, and re-run the affected checks. If the branch was already pushed, restoring it is another impactful remote change: confirm the current remote tip and use --force-with-lease.

Frequently asked questions

What does the Nixpkgs Patched AI skill do?

Use when temporarily carrying an unmerged nixpkgs pull request or commit in the personal ryan4yin/nixpkgs fork, updating the nixos-unstable-patched branch, or consuming that branch from this nix-config flake, including a WORKAROUNDS.md row whose removal condition is carrying the patch.

Why use Nixpkgs Patched on TypingMind?

Because you install it once and use it with any model. Nixpkgs Patched is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Nixpkgs Patched in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ryan4yin/nix-config/tree/main/.agents/skills/nixpkgs-patched. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Nixpkgs Patched?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Nixpkgs Patched?

As many as you like. As long as a model supports skills, you can use Nixpkgs Patched with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Nixpkgs Patched AI skill free?

Yes. It is published on GitHub by ryan4yin under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇