If the NixOS/Nix maintainers don't like flakes/DetSys (which I think is somewhat valid!), they need to put forward a canonical way of pinning channels, otherwise there's not really an alternative standard for the community to build around. The usual answer of just use niv or some other esoteric solution that a subset of hardcore Nix users like isn't enough.
All Niv does is produce a JSON file with your dependencies, then you use the Nix functions they provide to read and load the dependencies. It is probably the simplest possible dependency management strategy in Nix.
This is also not a Nix specific strategy tbh. If you are using Python, Go, JS, etc they manage dependencies in the same style (lock file with dependencies, tool to update them).
I don’t think the documentation for it is any worse than the rest of Nix (low bar, but we are comparing things in the Nix ecosystem).
Nothing major, but it just adds a bit of cognitive load.
I Installed Determinate Nix (via Nix-Darwin— I find it a bit annoying that their official Nix-Darwin module reverts Nix to non-declarative management) on my laptop in order to kick the tires.
May the lazy-trees-v2 branch soon be merged into mainline Nix as well. :)
Congrats to Eelco on getting this work into a state that he's ready to present to users. I hope testing goes well for DetSys users, including me!
I'm willing to add impurity especially about the system.
Having to define the systems feels unnecessary. Just define the targets for all systems and let me choose the one I want to build.
Coming across modules that forgot to add a particular system is frustrating.
Any other ways to circumvent this?
You can output whatever you want in a flake, with impure you can read system with builtins.currentSystem.
flake-compat (my fork and lix fork) supports evaluating from FS. Flake-compat just reads the lockfile and doesn't actually use "flake evaluation mode").
cosmic_quanta•8mo ago
I'm not familiar enough with Nix to understand, but it looks like the performance gains in the blog post might not all materialize to upstream users.
In any case, cool stuff
sureglymop•8mo ago
Interestingly, I recently found out that someone is working on being able to compile Gleam to Nix: https://codeberg.org/glistix/glistix
biggestlou•8mo ago