nix-for-dev
Use this when setting up Nix for a development project (devShell + package build) and you care about `nix develop` being fast.
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-for-dev
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
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 and code. 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-for-dev
What's inside
- Skill name
nix-for-dev- Description
- Use this when setting up Nix for a development project (devShell + package build) and you care about `nix develop` being fast. Covers the zero-inputs flake.nix + npins + default.nix/shell.nix layout, sub-flakes for non-user-facing Nix, and language-specific recommendations.
- License
- MIT
- Instructions
- 216 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- body: contains an absolute path from the author's machine
Files (1)
- SKILL.md
SKILL.md (first lines)
# Nix for development
A low-overhead Nix setup for dev projects: ~1s cold `nix develop`, ~0.1s warm, with a clean separation between the user-facing flake and internal Nix. Reference implementation: [juspay/kolu](https://github.com/juspay/kolu).
## Core principle: zero flake inputs
The top-level `flake.nix` declares **no `inputs`** at all. Each flake input adds ~1.5s of fetcher-cache verification on cold eval; a single `nixpkgs` input costs ~7s. With zero inputs, cold `nix develop` is ~1.0s, warm ~0.1s.
Instead, pin sources with [npins](https://github.com/andir/npins) and import them via `fetchTarball` / `callPackage` from files under `nix/`.
```nix
# flake.nix — slim, zero inputs
{
outputs = { self, ... }:
let
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
eachSystem = f: builtins.listToAttrs (map
(system: {
name = system;
value = f (import ./nix/nixpkgs.nix { inherit system; });
})
systems);
in
{
packages = eachSystem (pkgs: {
default = import ./default.nix { inherit pkgs; };
});
devShells = eachSystem (pkgs: {
default = import ./shell.nix { inherit pkgs; };
});
};
}
```
**Do not** add `nixpkgs`, `flake-parts`, `git-hooks`, etc. as flake inputs. If a downstream consumer needs to override the pinned nixpkgs, they can override the npins source (`NPINS_OVERRIDE_nixpkgs=/path`).
## File layout
```
flake.nix # slim wrapper, zero inputs
default.nix # main package(s), pkgs ? import ./nix/nixpkgs.nix { }
shell.nix # devShell, pkgs ? import ./nix/nixpkgs.nix { }
nix/
nixpkgs.nix # imports npins source + applies overlay
overlay.nix # injects leaf packages into pkgs
env.nix # env vars shared by build + devShell + wrapper
packages/<name>/ # callPackage-style leaf packages
npins/
default.nix # generated by npins (do not edit)
sources.json # pinned source revisions
```
`default.nix` and `shell.nix` both accept `pkgs ? import ./nix/nixpkgs.nix { }` so they also work via plain `nix-build` / `nix-shell`, not just `nix develop`.
## npins workflow
```bash
npins init # creates npins/ and pins nixpkgs
npins add github nixos nixpkgs --branch nixpkgs-unstable
npins update # update all pins
npins update nixpkgs # update one
```
`nix/nixpkgs.nix`:
```nix
# Pinned nixpkgs import — managed by npins.
# To update: npins update nixpkgs
let
sources = import ../npins;
nixpkgs = import sources.nixpkgs;
in
args: nixpkgs (args // {
overlays = (args.overlays or [ ]) ++ [ (import ./overlay.nix) ];
})
```
## Leaf packages via overlay
Pure callPackage-style packages live in `nix/packages/<name>/default.nix` and are auto-injected via `nix/overlay.nix`:
```nix
# nix/overlay.nix
final: _prev: {
my-fonts = final.callPackage ./packages/fonts { };
}
```
Packages that need per-invocation arguments (commit hash, build-time env) stay in the top-level `default.nix` — overlays are for things that legitimately belong on `pkgs`.
## Shared env vars
Define a single `nix/env.nix` returning an attrset; both the build derivation and the devShell spread it into their `env`. This prevents drift between `nix build` and `nix develop`.
```nix
# nix/env.nix
{ pkgs }: {
MY_FONTS_DIR = pkgs.my-fonts;
MY_GH_BIN = "${pkgs.gh}/bin/gh";
}
```
## devShell conventions
- Use `pkgs.mkShell` directly. **Do not** introduce `flake-parts` to "structure" it.
- Use `pkgs.writeShellApplication` (not `writeShellScriptBin`) — strict mode + `runtimeInputs` validation. Always set `meta.description`.
- Run `nixpkgs-fmt` from the devShell rather than wiring up `formatter` perSystem.
- Expose extra shells via `overrideAttrs` so the base stays fast:
```nix
devShells = eachSystem (pkgs:
let default = import ./shell.nix { inherit pkgs; };
in {
inherit default;
e2e = default.overrideAttrs (prev: {
env = (prev.env or { }) // {
PLAYWRIGHT_BROWSERS_PATH = pkgs.playwright-driver.browsers;
};
});From 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.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-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.586score
nix-justfile
juspay
Conventions for writing justfile recipes in Nix-based projects.
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-oss-cache
juspay
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…
SkillCFreshness: C★ 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)
- Sep 28, 2026 (1 month 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.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 - 0.586score
nix-justfile
juspay
Conventions for writing justfile recipes in Nix-based projects.
SkillBFreshness: B★ 11Claude Code +9
Cite this page
nix-for-dev skill. Agent Mart. https://agentmart.dev/skills/juspay-nix-for-dev (last updated 2026-10-24)