2025-09-06 –, Aula
Nix is a powerful tool, but it also comes with some well-known problems: a steep learning curve, bad error messages, and slow evaluation. What if we could solve these three problems in one stroke?
garn is an experiment in doing just that. With garn, you define derivations with TypeScript instead of in the Nix language. TypeScript is familiar to most developers, well-documented, and supported by rich editor tooling - thus lowering the learning barrier. And instead of stack traces, you mostly get (much nicer) type errors.
garn also rethinks the CLI, clarifying the core user-facing concepts in Nix, and how they relate to one another. What exactly is a devshell? A check? A NixOS configuration? What operations make sense with them? By thinking of these as first-class objects instead of "just derivations", garn makes the UX more approachable, and more powerful.
The currently-released version of garn generates Nix code, which means we still incur the cost of (often slow) Nix evaluation. But we are working on a second version which ditches Nix evaluation altogether, and uses Nix only to build .drv files. This opens the door to substantial speed improvements, with techniques such as pre-evaluating Nix (FFI) code, caching evaluation in a finer-grained way, async IFD, and even using WASM as an alternative to IFD.
This talk will show how garn works both above and under the hood. It's aimed at anyone interested in making Nix faster and more accessible.
Julian was born in Brazil, but has lived in India, the US, Germany and now Switzerland. He is the CEO of garnix; prior to that, he variously cowrote the Haskell servant web framework, worked at a newspaper, started but never finished a philosophy PhD, and was Brazilian chess champion under 16.