Nixtamal 1.0.0 released
11 points by toastal
11 points by toastal
Neat, I've been looking for a flakes alternative and this ticks basically all the boxes!
Though I have to say, the choice of KDL for the manifest format is a bit of a headscratcher. Why not just use Nix? Yes, nixlang is not immensely popular, but anybody using this will already have a bunch of Nix code anyway, so adding in KDL seemingly just makes things weird for no good reason.
KDL can be parsed Nix has to be evaluated
IIRC even in flakes the manifest list is a restricted subset of nixlang for this reason. It's just that 99% of the time you don't actually want to do anything fancy with it so you don't notice.
Yes, which is exactly why I want something else than flakes. I'm the 1%, I want to be fancy with my inputs!
As a sibling said, this can be immediately parsed as there aren’t really any Nix parsers & Nix doesn’t have a proper spec (look at how much work it has been for Snix/Tvix which still aren’t fully there while also needing to follow Nix as a moving target).
I find the ergonomics of KDL are quite nice—as does the likes of Zellij (terminal multiplexer), Niri (Wayland WM), & River (reverse proxy) which also use it. It’s also fully-spec’d with a schema language (see Nixtamal’s schema here) akin to XML since it claims XML (& JSON) compatibility. Tooling exists like kdlfmt & has been improving where I believe they want to add attaching schema documents soon which you could see a good LSP story as well as something akin to XSLT for transformations.
I find JSON, TOML, YAML, XML to not be good for configuration in practice despite popularity due to poor ergonomics and/or complexity. I was going to give EDN a shot, but it seemed (sadly) obscure at this point, not “on-the-rise” as it were. One could have made any of these options work, but you will be taking trade-offs to write/readability for humans (or accessibility in YAML’s case). Did you find the Nixtamal showcase KDL hard to read?
I see, so KDL is a pure data language with no programming capabilities like Nix. That does make a bunch of things easier.
My use cases are a bit weird I suppose because I want to evaluate code to define my inputs. I have a repo where the same dependency is fetched in many different versions, and to figure out which versions you need to evaluate some Nix code.
As for readability, no that's not really the issue, it looks fine.