We want to make Nix better
Disclaimer: I&#x27;m working on a build system that will eventually do what Nix does but make it much easier to use.<p>If they do manage to create a system where Nix is hidden, and end users never have to directly touch it, I think this could work and make my work never see the light of day.<p>But I have my doubts that they will be able to do that, and it boils down to one simple reason: declarative is not powerful enough.<p>Don&#x27;t get me wrong, for 90%, possibly more, of use cases, it&#x27;s enough. And it is preferable to keep things declarative as long as possible, so much so that my build system will have a way of restricting itself to purely declarative code when possible (and will error otherwise).<p>However, when more power is necessary, it is <i>required</i>; it is not possible, by the definition of Turing-completeness and declarative, to do the same thing with a declarative language that can be done with a Turing-complete language. So when that power is missing, the only option is to work around it.<p>This is why Nix is really just a front for bash. For all of its faults, at least bash is Turing-complete.<p>But this fact means that there will be things that Nix will fail to do on its own. I suspect this means that the abstraction around Nix will always be leaky. Maybe it won&#x27;t be unacceptably leaky, but I&#x27;m not very hopeful.<p>I think Nix would be better served by doing the following:<p>1. Rewriting the language. This would require an auto-transformer to the new language in order to not throw away the entirety of nixpkgs, but transforming a declarative language to a Turing-complete one is easy.<p>2. Spend gobs of time on user experience. Make the usual commands short, easy to remember, and easy to use with few options. Make usual things easy and powerful things safe. For example, to make a powerful thing safe, make sure that screwing it up will not screw up their system.<p>3. But not only should they <i>be</i> safe, they should <i>feel</i> safe, giving users every opportunity to back out without consequences. This is where git goes wrong: it does not feel safe, so users are scared of it. [0] I believe Nix is the same way, even though it is safer than git.<p>4. Spend gobs of time on documentation. Use Fred Rogers&#x27; list of rules for talking with children [1] in each piece of documentation. This will make it easier to avoid the trap of not explaining something the user needs because the writer forgot that they didn&#x27;t know it. In essence, the documentation should treat new users as Fred Rogers treated children: ignorant, but capable.<p>5. The documentation also needs to have a different focus. Instead of focusing on how great Nix is, it should focus on helping users get stuff done. Nix enthusiasts should be able to say, &quot;Oh, you want to set up a development environment for your project? Great, go to such-and-such tutorial. It will tell you exactly how to do that even if you don&#x27;t have Nix installed.&quot; This should be done for as many use cases as people have, including less common ones. Some examples: using Nix as a build system, using Nix to install multiple versions of glibc and how to switch between them, using Nix to set up systemd, using Nix to replace a Docker container in production, using Nix to distribute builds, etc.<p>[0]: <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;1597&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;1597&#x2F;</a><p>[1]: <a href="https:&#x2F;&#x2F;www.mentalfloss.com&#x2F;article&#x2F;547536&#x2F;mr-rogers-rules-for-talking-to-kids" rel="nofollow">https:&#x2F;&#x2F;www.mentalfloss.com&#x2F;article&#x2F;547536&#x2F;mr-rogers-rules-f...</a>