I lead Tweags Nix team.
The Nix ecosystem reaches a turning point in its evolution. After greater than a decade of slow but steady growth, Nix gained lots of traction before couple of years, leading the city to expand at an astonishing rate.But this growth hasnt been without issue.
As consultants, we note that almost all of our clients which are using Nix are, at best, frustrated by the accidental complexity that is included with it.A number of them even opt to back off due to that, left with a nondescript feeling that Nix isn’t ready for them.
We value Nix, and we wish it to thrive.
The best way to get there would be to strengthen Nixs core whenever you can.Rather than getting lost in lots of exciting items that Nix could do, we should have a pragmatic approach in making certain the core functionality of Nix is effective, and can be acquired to everyone.
Specifically, wed prefer to concentrate on making Nix an excellent developer tool. We believe requires Nix to:
- solve peoples problems,
- work reliably everywhere, and
- be ubiquitous.
I really like the Nix model.From the theoretical CS background, the principles behind Nix are those the complete computing industry must have adopted, and I miss the day if they end up being the standard.But real-life can be something, and despite my partiality towards Nix, I occasionally need to admit that, well, its not good-enough used for what I wish to do.And when I must admit that, this means that most individuals who dont value the theoretical side will just give up it, and rightfully so. Why should anyone work with a tool that doesnt solve their problem?
So we wish Nix to supply an obvious path towards solving clear problems.Identifying these problems has already been a non-trivial section of the work, but from our past experience we are able to sketch out some broad axes along which to boost.
Veterans Nix users generally consider
nix-shell or its successor
nix develop to become a nice byproduct of the broader Nix world: If you package your program to be constructed with Nix, you then also incidentally understand this nifty environment which you can use to build up it.And thats actually how
nix-shell started an instant hack for debugging packaging issues.
Nevertheless, you these developments environments are incredibly valuable independently.Even though you dont have an effective clean Nix packaging, it is possible to just drop in a
flake.nix somewhere and obtain all your dependencies magically pulled-in for you personally.
You want to rethink this functionality to directly address the requirements of people, instead of featuring its usefulness be considered a mere incidental nicety.This implies:
- Actually attempting to realize why and how folks are deploying it, and how they might benefit more as a result be it through principled user-studies or by hearing the feedback of the city and our clients.
- Out of this high-level vision, rethink
nix developto raised answer these needs, utilizing a documentation-driven method of keep carefully the end-user in the heart of the loop, maybe building on or drawing inspiration from other projects like Numtides devshell or nix-output-monitor.
Be it as a backend because of their development environments or because they’re more hooked into Nix, numerous Nix users need a lot more than just having the ability to run a Nix command by themselves machine.A good reasonably simple Nix setup might quickly require running Nix on the CI, with a binary cache, maybe even distributed builds, etc.And also simple cases of this are usually an enormous pain to accomplish properly.
Some projects just like the awesome cachix and the related github actions or nixbuild.net provide a few of this infrastructure as something, however they arent always a satisfactory option, nor are they a justification for a negative out-of-the-box experience.Besides, theres only so much they can do, plus some problems (performance specifically) can only just be solved at the main the Nix implementation itself.
Solving this problem in its full generality is really a hard problem, however we are able to ensure that the easiest & most common use cases are properly covered as simply as you possibly can and thoroughly documented.
In the easiest scenarios, Nix works great. Nix on NixOS is really a breeze, Nix on Ubuntu is effective 99% of that time period, and Debian even makes Nix obtainable in its repositories.Another scenarios range between OK to awful (any Mac users around? ).
It is a sad state, however, not a fatality.We (the city) have the resources to create Nix successful story everywhere it could be, and we (Tweagers) desire to be considered a driving force for that effort.
This implies specifically:
- Improving the Nix installer. This is a tiny but crucial little bit of the ecosystem being usually the initial thing that folks run before using Nix on something yet it really is among the least loved elements of the Nix codebase.
- Fostering more efforts to help keep nixpkgs healthy on MacOS. The Nixcommunity survey reports that theres more thanthree time more Linux users than MacOS users in theNix community. Equate to developers generally: you can find only slightly fewer Mac users than Linux users based on the Stack Overflow survey.
- Allowing Nix to perform in restricted corporate environments, for instance without or restricted root access, or using access-control systems like SELinux.
Being simple and reliable is fantastic. But know whats better? Being everywhere.
Take the nice old shell script.Its not simple for anything beyond just sequencing several commands.Its arguably not reliable either for the reason that it has so many traps that a lot of shell scripts in the open are bound to inflate given anything as malicious as a filename with spaces or a clear parameter.Yet everyone myself included uses shell script for so a lot of things, because its just the de facto standard, so we realize that it’ll be available and that folks will understand whats going on.Even though people make an effort to replace it, they keep it as a spot of reference as well as make an effort to stay appropriate for it.
Likewise, we wish Nix to be everywhere.We wish a global where getting a
flake.nix at the main of a software project isn’t a nice surprise but something expected and common.And we wish individuals who design tomorrows software distribution mechanism to at the very least know and recognize the Nix model, and take that into consideration.
To obtain there, we intend to:
- keep carefully the marketing team efforts going, to create more people alert to Nix and present the city tool to speak about it,
- keep writing and discussing Nix in public areas,
- participate or help organize conferences and workshops.
That is obviously an easy roadmap, and bound to evolve.A few of that, just like the marketing team efforts or the task on the Nix package manager was already going on for quite a while.Undertakings just like the coordinated documentation effort or the nixpkgs-architecture team is merely starting out.Some have yet to begin with.However, hopefully that it can help reveal the task that Tweag does and intends to accomplish for the Nix community, and perhaps also serve being an inspiration both for a potential community-wide roadmap and for individual contributions.
We also plan to regularly publish a shorter-term roadmap on discourse alongside our usual dev updates. So keep tuned in!