nix-reference

Installation
SKILL.md

String Escaping

When writing Nix strings that contain code for other languages (TypeScript, JavaScript, etc.), remember:

What you want in output Nix syntax
${variable} ''${variable}
$${variable} $''${variable}
''${literal} '''${literal}

Rule: Use two single quotes '' before ${} to prevent Nix from interpolating it.

Example - Generating TypeScript with template literals:

Installs
1
Repository
sirn/dotfiles
GitHub Stars
8
First Seen
Mar 3, 2026
nix-reference — sirn/dotfiles