replit-nix

Installation
SKILL.md

Replit + Nix: use the store's libs

Field-verified (2026-09-02/03). Scope: everything about pulling packages out of /nix/store at runtime. Platform facts (persistence, $HOME wipes, XDG, registry firewall, .replit) live in the replit-knowledge skill.

1. The three-layer model

Anything that needs a non-baseline shared lib (GTK, X11, ALSA, …) has exactly three layers. Missing any layer = failure:

Layer What it is Cost
L1 — store must CONTAIN the libs replit.nix (recommended) or nix-env -iA or a warm store from a prior build replit.nix: one-time, async rebuild; nix-env: immediate, lost on container recreate
L2 — the full transitive closure as LD_LIBRARY_PATH generated file: nix path-info --recursive <root> per top package, keep paths shipping lib/, exclude base-provided families ~2s to generate
L3 — the loader sees L2 export LD_LIBRARY_PATH="$(cat file)" before launch (or a wrapper does it) free

L1 is the part people skip — "the sandbox must have the libs" is the assumption that fails. L2 is the part everyone gets wrong — see §3.

Installs
8
First Seen
Sep 3, 2026
replit-nix — skynight137/skills