Stuff for Nix
Nix sure is something. Ostensibly, it's an interpreter for a lazy functional DSL that excels at specifying reproducible builds. This is then adapted to a package and configuration manager that lets you treat your system configuration as object code. It has its quirks and frustrations:
- The language is supposedly a straightforward lazy dynamically typed ML, but:
- you get no pattern matching outside of function heads that take “
attrsets
” (Nix-speak for string-indexed hash maps), - and so much of idiomatic Nix revolves around exploiting laziness for fixed-point knot-tying magic that it's incredibly easy to get infinite recursion.
- you get no pattern matching outside of function heads that take “
- The packaging conventions leave something to be desired;
- “closure bloat” is so rampant that you have to put special effort into keeping the runtime footprint of a package small, even when statically linking
- (this is exacerbated by the “support” for structured and well-defined package flavours, which ranges from “ad-hoc” to “none”).
Oh, and turnaround on rebuilding the system configuration on NixOS is feeling sluggish in recent years.
nix-darwin
has really spoiled me with how comparatively zippy its rebuilds are.
That being said, it's still infinitely better than anything else with vaguely the same job description, and I can't recommend it enough.
Here are my utilities for Nix:
dyn
, a hacky little quality-of-life package that I use across my server configurations and mynix-darwin
setup.- more to be published Soon™