The Nix NGI Team: Advancing Open Source with Nix
discourse.nixos.org
discourse.nixos.org
Bravo to the EU, NLNet and the NixOS contributors making this possible!
Through the NixOS Foundation’s collaboration with NGI Zero, we’re tackling over 1,200 NLnet-funded software projects, packaging them for Nix and enhancing their discoverability. Our work focuses on building development environments, libraries, services, and more, while also improving tools and processes for the entire Nix community.
Gentoo has openrc, which is a billion times less insane.
It doesn't matter if you think systemd is good or bad, a generic system with systemd works better.
There are other declarative init systems that could replace systemd, but what's the point when systemd does everything?
I think guix, nix-darwin, and nixbsd all prove that you can in fact implement such a system just fine without needing systemd.
> There are other declarative init systems that could replace systemd, but what's the point when systemd does everything?
Because systemd doesn't do everything, and depending on it artificially limits what we can do. See guix running on hurd, nix-darwin running on darwin, and nixbsd running on freebsd; systemd explicitly has no interest in supporting anything but Linux.
That aside, systemd is a genuinely terrible software project and a genuinely terrible init system.
Just FYI, before my experience of 5 days a week dealing with systemd, I thought people who disliked it were just exaggerating or wanting to be "different". I assumed most hate it was getting was undeserved. My professional experience made it absolutely clear to me that every piece of hate it is getting is well deserved. It is bad software all around, terrible design decisions, completely unpredictable, hard to debug and all around very poorly integrated into the rest of the system.
I don't think any of them are trying to make huge changes to the language itself, considering that an inability to use Nix packages would be a deal breaker for basically everyone.
The complexity comes in with the ecosystem and nix-the-build-system, each of which has a dozen different ways to do any given thing, all of which are in active use simultaneously. Some are pretty baffling, like nixpkgs' dual role as both the main package repository and the (almost entirely undocumented) de facto standard library
Nixpkgs specifically needs to be entirely rethought. It has become too large and complex to manage both technically and politically with the number of contributors. Separating out the lib, stdenv/tooling, and package definitions would be a good start.
IMO the nix language is excellent as templating language, I'd happily use it instead of jinja2 for generating html at a daily job, maybe this will be possible at some point.
You wanted to do something and found a page about how to do it? Cool, good chance it won't work anymore cause it changed. If you do get an error from nixos-rebuild because of your nix files, the error report will probably not be useful either.
In short, no, the language is not the source of difficulty.
Nix is essentially jsonnet, which you'd argue is simple... Because your first interaction with it isn't implementing an operating system.
Several people have worked on offshoots of Nix and the Nix language that try to address this in different ways. For example, there is Nickel: https://github.com/tweag/nickel
I think the Nix language is OK for what it is: lazy evaluation and functional purity is a good fit for what Nix aims to do. That said... I definitely feel like functionally-pure programming languages have trouble when it comes to trying to write maintainable code. I'm sure that statement would anger some, but it is my personal belief trying to use functional programming languages as a life long imperative programmer: the advantages of functional purity are pretty obvious, but writing code that you can't make sense of later is so much easier for me in functional languages. They're so powerful and elegant that writing nearly indecipherable things feels very tempting at times.
So, I'd be interested in seeing someone attempt a Nix-like ecosystem built around something else. If Bazel can do "hermetic-ish" with Starlark, I reckon you could pull off something like Nix with it, too.