nix-oss-cache
Use this when setting up a GitHub repo to push its Nix builds to Juspay's shared OSS Attic cache (cache.nixos.asia/oss) — adds the substituter to flake.nix, a…
Skill by juspay
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/juspay-nix-oss-cache
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: devops, security, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/nix-oss-cache
What's inside
- Skill name
nix-oss-cache- Description
- Use this when setting up a GitHub repo to push its Nix builds to Juspay's shared OSS Attic cache (cache.nixos.asia/oss) — adds the substituter to flake.nix, a nix-cache.yml GitHub Actions workflow, and prompts for the ATTIC_TOKEN secret.
- License
- MIT
- Instructions
- 146 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Push to Juspay's OSS Nix cache
Wire a GitHub repo into the shared Attic cache at [`cache.nixos.asia/oss`](https://cache.nixos.asia). CI builds the flake's default package on every push to the default branch and pushes the resulting closure, warming both CI and local `nix build`s for everyone. Reference: [juspay/kolu#1731](https://github.com/juspay/kolu/pull/1731), [#1733](https://github.com/juspay/kolu/pull/1733).
Three pieces are needed: the cache as a **substituter** (so the repo _pulls_ from it), a **workflow** (so CI _pushes_ to it), and the **`ATTIC_TOKEN` secret** (so the push authenticates). Do all three.
## Initial setup questionnaire
Before touching any files, use the **Ask tool** (`AskUserQuestion`) to settle the **trigger scope** — which branches should trigger a build-and-push?
- **Default branch only** — push on the default branch (`main`/`master`) plus `pull_request` and `workflow_dispatch`. Warms the cache from merged, reviewed code. Recommended for most repos.
- **All branches** — push on every branch too, so feature branches warm the cache. Costs more CI minutes and can push closures from unreviewed code.
Assume the user already has an `ATTIC_TOKEN` push token (they obtain it from the cache admin — Juspay infra — via `atticadm make-token`, scoped to the `oss` cache). Don't block on it here; step 3 confirms it's set on the repo and loops until it is.
## 1. Add the cache as a substituter
In the repo's top-level `flake.nix`, add (or extend) `nixConfig`:
```nix
nixConfig = {
extra-substituters = "https://cache.nixos.asia/oss";
extra-trusted-public-keys = "oss:KO872wNJkCDgmGN3xy9dT89WAhvv13EiKncTtHDItVU=";
};
```
## 2. Add the workflow
Set the `on:` triggers to match the **trigger scope** answer from the questionnaire. The template below is the default-branch-only variant.
### Already have a `nix build` workflow? Piggyback on it.
If the repo already has a workflow that runs `nix build` (e.g. a CI job), **don't add a second one** — just drop the `ryanccn/attic-action` step into the existing job, *before* the build step, so its end-of-job hook pushes whatever that job builds:
```yaml
- uses: ryanccn/attic-action@5635a15ef0c5462194ffbd05d1daeddc74625c3a # v0.5.0
with:
endpoint: https://cache.nixos.asia
cache: oss
token: ${{ secrets.ATTIC_TOKEN }}
```
The action pushes every store path realised during the job, so no explicit push step is needed. Only create the standalone `nix-cache.yml` below when there's no existing build job to hook into. (Note: if the existing job uses the DeterminateSystems installer rather than `nix-quick-install-action`, verify attic-action still finds a new-enough Nix for `nix profile add`.)
### Standalone workflow
Create `.github/workflows/nix-cache.yml`. `ryanccn/attic-action` handles install, login, substituter config, and pushing every store path the job produced at job end.
```yaml
# Build the default package on linux + darwin and push each closure to the
# shared Attic cache (https://cache.nixos.asia/oss).
name: nix-cache
on:
push:
branches: [master] # set to the repo's default branch
pull_request:
workflow_dispatch:
# Least privilege — this job only needs the checkout and ATTIC_TOKEN secret.
permissions:
contents: read
concurrency:
group: nix-cache-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-push:
strategy:
fail-fast: false
matrix:
# ubuntu-latest → x86_64-linux; macos-latest → aarch64-darwin.
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# Pin by commit (CodeQL: unpinned third-party action). v35 → 9f63be7.
# v35 defaults to Nix 2.34.7, new enough for attic-action's `nix profile add`.
- uses: nixbuild/nix-quick-install-action@9f63be77f412a248c9d9a65a4c82cf066cdf8f0c # v35
with:
nix_conf: |
extra-substituters = https://cache.nixos.asia/oss
extra-trusted-public-keys = oss:KO872wNJkCDgmGN3xy9dT89WAhvv13EiKncTtHDItVU=
accept-flake-config = true
- uses: ryanccn/attic-action@5635a15ef0c5462194ffbd05d1daeddc74625c3a # v0.5.0
with:
endpoint: https://cache.nixos.asia
cache: oss
token: ${{ secrets.ATTIC_TOKEN }}
- name: Build
run: nix build -L --print-out-paths
```
Rules:
- For **default branch only**, set the `push.branches` filter to the repo's actual default branch (kolu uses `master`; many repos use `main`). For **all branches**, drop the `branches:` filter so `push:` fires everywhere.
- Keep both actions **pinned by commit SHA** (CodeQL flags unpinned third-party actions). The `# v35` / `# v0.5.0` trailing comments record the tag. Prefer the SHAs above unless a newer release is needed; do not replace them with floating tags.
## 3. Set the ATTIC_TOKEN secret
The token is a repo secret you can't set for the user — it's their token, entered interactively so it stays out of shell history. **Give them this command and ask them to run it**, then confirm:
```bash
gh secret set ATTIC_TOKEN --repo <owner>/<repo>
```
`gh` prompts for the value interactively (never paste the token into a command line that gets logged). After they say they've run it, **re-check** and **re-ask until it's present**:
```bash
gh secret list --repo <owner>/<repo> # ATTIC_TOKEN should appear
```
If it's missing, tell them and ask again — loop until `gh secret list` shows `ATTIC_TOKEN`. The workflow fails loudly without this secret; there is no silent skip.
## 4. Open a PRFrom juspay/skills, MIT.
More from juspay/skills
- 0.632score
solidjs
juspay
Use this when writing, reviewing, or auditing SolidJS code for fine-grained reactivity, stable view identity, and owned resource lifetimes.
SkillAFreshness: A★ 11Claude Code +9 - 0.631score
nix-ci
juspay
Use this when setting up CI for a GitHub repository — offers GitHub Actions or Vira depending on the project
SkillAFreshness: A★ 11Claude Code +9 - 0.628score
nix-for-dev
juspay
Use this when setting up Nix for a development project (devShell + package build) and you care about `nix develop` being fast.
SkillAFreshness: A★ 11Claude Code +9 - 0.626score
waterfall
juspay
Implement anything end-to-end using two agents: planner cum reviewer (premium model) and an implementer (fast model)
SkillAFreshness: A★ 11Claude Code +9 - 0.592score
pg
juspay
Write essays, articles, and blog posts in Paul Graham's voice — plain, spoken prose that reasons out loud and lands surprising true claims, not AI filler.
SkillBFreshness: B★ 11Claude Code +9 - 0.586score
nix-justfile
juspay
Conventions for writing justfile recipes in Nix-based projects.
SkillBFreshness: B★ 11Claude Code +9 - 0.586score
nix-rust-leptos
juspay
Conventions for building Leptos CSR apps with Nix (crane + Trunk).
SkillBFreshness: B★ 11Claude Code +9 - 0.586score
nix-typescript
juspay
pnpm + Nix build conventions.
SkillBFreshness: B★ 11Claude Code +9 - 0.581score
cargo-watch
juspay
Run cargo-watch in the background for continuous clippy feedback during code editing.
SkillBFreshness: B★ 11Claude Code +9 - 0.542score
nix-perf
juspay
Use this when a flake's `nix develop` / `direnv allow` / `nix flake archive` is slow on a fresh checkout (the "first time takes 10 minutes" complaint).
SkillCFreshness: C★ 11Claude Code +9 - 0.542score
nix-bun
juspay
Use this when building a Bun (bun.lock) project with Nix.
SkillCFreshness: C★ 11Claude Code +9 - 0.477score
nix-health
juspay
Use this when diagnosing or fixing a user's Nix installation — checks flakes, version, caches, max-jobs, direnv, rosetta, trusted-users, and shell config
SkillDFreshness: D★ 11Claude Code +9
Signals
- Stars
- 11
- Forks
- 0
- Open issues
- 3
- Last commit (this folder)
- Jul 11, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/juspay/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from juspay
- 0.632score
solidjs
juspay
Use this when writing, reviewing, or auditing SolidJS code for fine-grained reactivity, stable view identity, and owned resource lifetimes.
SkillAFreshness: A★ 11Claude Code +9 - 0.631score
nix-ci
juspay
Use this when setting up CI for a GitHub repository — offers GitHub Actions or Vira depending on the project
SkillAFreshness: A★ 11Claude Code +9 - 0.628score
nix-for-dev
juspay
Use this when setting up Nix for a development project (devShell + package build) and you care about `nix develop` being fast.
SkillAFreshness: A★ 11Claude Code +9 - 0.626score
waterfall
juspay
Implement anything end-to-end using two agents: planner cum reviewer (premium model) and an implementer (fast model)
SkillAFreshness: A★ 11Claude Code +9 - 0.601score
nix-chrome-devtools-mcp
juspay
chrome-devtools-mcp launcher — a single bash script that resolves Playwright's bundled Chrome-for-Testing and Node.js directly through Nix.
SkillAFreshness: A★ 4Claude Code +9 - 0.592score
pg
juspay
Write essays, articles, and blog posts in Paul Graham's voice — plain, spoken prose that reasons out loud and lands surprising true claims, not AI filler.
SkillBFreshness: B★ 11Claude Code +9
Cite this page
nix-oss-cache skill. Agent Mart. https://agentmart.dev/skills/juspay-nix-oss-cache (last updated 2026-10-24)