We want to make Nix better

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • nixpkgs

    Nix Packages collection & NixOS

  • I love nix, I've been using it for the last 2 years, I have a very stable setup from these 2 years of effort [0], and I just can't recommend Nix for Linux beginners, why?

    It's not because of the nix language, It's not because of the CLI, it's because everything is scattered, you have to consult many places to find out how to do things with Nix, here is an example:

    Usually, when I need a new complex program, like Steam, I first check the system-wide configuration [1], the wiki [2] and the package list [3], if I just want it on my user, I need to check if Home Manager has an option [4], if it doesn't, I can try using the "home.packages" option. Now, if I need to override something on the package, I need to remember how to do it with [5] [6] (while checking the source code for the package in parallel to find the options).

    And then sometimes, on very rare occasions, I need to fine tune something with the nix language, so I need to check the builtins/lib docs [7], but some builtins are not there, so I need to either use nix-doc [8] or find the docs inside the code-bases [9] [10] (they are split between both repos)

    For me, this is one of the main pain points of using Nix / NixOS that needs to be solved.

    [0] - https://github.com/shiryel/nixos-dotfiles

    [1] - https://search.nixos.org/options

    [2] - https://nixos.wiki/wiki/Steam

    [3] - https://search.nixos.org/packages

    [4] - https://mipmip.github.io/home-manager-option-search/

    [5] - https://nixos.org/manual/nixos/stable/#sec-customising-packa...

    [6] - https://nixos.org/guides/nix-pills/nixpkgs-overriding-packag...

    [7] - https://teu5us.github.io/nix-lib.html

    [8] - https://github.com/lf-/nix-doc

    [9] - https://github.com/NixOS/nix

    [10] - https://github.com/NixOS/nixpkgs

  • nix

    Nix, the purely functional package manager

  • I love nix, I've been using it for the last 2 years, I have a very stable setup from these 2 years of effort [0], and I just can't recommend Nix for Linux beginners, why?

    It's not because of the nix language, It's not because of the CLI, it's because everything is scattered, you have to consult many places to find out how to do things with Nix, here is an example:

    Usually, when I need a new complex program, like Steam, I first check the system-wide configuration [1], the wiki [2] and the package list [3], if I just want it on my user, I need to check if Home Manager has an option [4], if it doesn't, I can try using the "home.packages" option. Now, if I need to override something on the package, I need to remember how to do it with [5] [6] (while checking the source code for the package in parallel to find the options).

    And then sometimes, on very rare occasions, I need to fine tune something with the nix language, so I need to check the builtins/lib docs [7], but some builtins are not there, so I need to either use nix-doc [8] or find the docs inside the code-bases [9] [10] (they are split between both repos)

    For me, this is one of the main pain points of using Nix / NixOS that needs to be solved.

    [0] - https://github.com/shiryel/nixos-dotfiles

    [1] - https://search.nixos.org/options

    [2] - https://nixos.wiki/wiki/Steam

    [3] - https://search.nixos.org/packages

    [4] - https://mipmip.github.io/home-manager-option-search/

    [5] - https://nixos.org/manual/nixos/stable/#sec-customising-packa...

    [6] - https://nixos.org/guides/nix-pills/nixpkgs-overriding-packag...

    [7] - https://teu5us.github.io/nix-lib.html

    [8] - https://github.com/lf-/nix-doc

    [9] - https://github.com/NixOS/nix

    [10] - https://github.com/NixOS/nixpkgs

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • nickel

    Better configuration for less

  • The name Nix is used for the language, package system, and sometimes the whole ecosystem. There is a recent post that tells the difference https://www.haskellforall.com/2022/08/stop-calling-everythin...

    Knowing functional programming helps but Nix still is a hard language to learn. I have a lot of Haskell experience but the Nix language was very confusing for me. At first I couldn't even tell a variable name from a keyword (it is a convention to call variables "self" and "super" in some contexts). The Nix language has been created for research in build systems and has evolved over a long time, so it has accumulated quite a lot of idiosyncrasies and cruft.

    I hope that a simpler typed language like https://github.com/tweag/nickel replaces it.

  • bob

    Bob is a high-level build tool for multi-language projects. (by benchkram)

  • "But there’s a catch: to make that happen you need to write some Nix, use Nix tools, and probably consult several documentation sources."

    You can use bob[1] if you want a build tool which uses Nix to install dependencies in an easy manner: just list the package names for a task and then they will be installed.

    I'm looking forward for all the changes in Nix ecosystem and it's a good sign the fact that they also started working on an initiative to improve Nix documentation which was spread all over the places.

    [1] https://bob.build/

  • nix-doc

    An interactive Nix documentation tool providing a CLI for function search, a Nix plugin for docs in the REPL, and a ctags implementation for Nix script

  • I love nix, I've been using it for the last 2 years, I have a very stable setup from these 2 years of effort [0], and I just can't recommend Nix for Linux beginners, why?

    It's not because of the nix language, It's not because of the CLI, it's because everything is scattered, you have to consult many places to find out how to do things with Nix, here is an example:

    Usually, when I need a new complex program, like Steam, I first check the system-wide configuration [1], the wiki [2] and the package list [3], if I just want it on my user, I need to check if Home Manager has an option [4], if it doesn't, I can try using the "home.packages" option. Now, if I need to override something on the package, I need to remember how to do it with [5] [6] (while checking the source code for the package in parallel to find the options).

    And then sometimes, on very rare occasions, I need to fine tune something with the nix language, so I need to check the builtins/lib docs [7], but some builtins are not there, so I need to either use nix-doc [8] or find the docs inside the code-bases [9] [10] (they are split between both repos)

    For me, this is one of the main pain points of using Nix / NixOS that needs to be solved.

    [0] - https://github.com/shiryel/nixos-dotfiles

    [1] - https://search.nixos.org/options

    [2] - https://nixos.wiki/wiki/Steam

    [3] - https://search.nixos.org/packages

    [4] - https://mipmip.github.io/home-manager-option-search/

    [5] - https://nixos.org/manual/nixos/stable/#sec-customising-packa...

    [6] - https://nixos.org/guides/nix-pills/nixpkgs-overriding-packag...

    [7] - https://teu5us.github.io/nix-lib.html

    [8] - https://github.com/lf-/nix-doc

    [9] - https://github.com/NixOS/nix

    [10] - https://github.com/NixOS/nixpkgs

  • rfcs

    The Nix community RFCs (by wmertens)

  • Actually the cache isn't that important, most binaries get rebuilt quite often due to their dependencies changing.

    Although it is my hope that rfc 17 eventually makes it through: https://github.com/wmertens/rfcs/blob/master/rfcs/0017-inten...

  • jsonnet

    Jsonnet - The data templating language

  • > To seriously answer the question: is the Nix language required for the Nix packaging system to exist? Laziness is required, to some degree, but can the next iteration provide an on-ramp which doesn't involve learning a new lang and paradigm? Guix folks sure think so.

    I'd love to hear from someone deeply familiar with Nix and Guix about laziness.

    I'm deeply familiar with Nix and I've concluded that lazy semantics is absolutely critical for a configuration language. It lets me refer to other attributes of my configuration from anywhere. For example, I can refer to port number from my whatever service in my firewall. Nix's system of overlays depends on laziness too to provide efficient late-binding familiar from OOP.

    I don't need to topologically sort the evaluation of the various inter-dependencies of my configuration. So long as there exists an evaluation order, laziness finds it.

    Laziness is compelling enough that I managed to convince the author of Jsonnet <https://jsonnet.org/> of it when he was designing it, and in turn he helped me design what is now known as overlays in Nix.

    I don't even understand how Guix manages to work without laziness, though clearly it does somehow. I'm curious as to how that is possible, though I fear I will only ever truly understand by diving into Guix.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • esbuild

    An extremely fast bundler for the web

  • The external dependency problem is somewhat solved in npm (at least, as far as many users are concerned) by writing a module that downloads the appropriate binary.

    For example, esbuild is written in Go, which is compiled to a different binary for each system. The NPM for esbuild has 21 optional dependencies, one for each binary that it makes available. A post-install script [1] chooses which dependency to install. It seems like a lot of work for the maintainer?

    It probably helps that the Go SDK builds static binaries.

    [1] https://github.com/evanw/esbuild/blob/master/lib/npm/node-in...

  • qmk_firmware

    Open-source keyboard firmware for Atmel AVR and Arm USB families

  • > Agreed! Most repos with a shell.nix and heavy dependencies use their own binary cache with the service cachix.org (free for public repos).

    Created an issue:

    https://github.com/qmk/qmk_firmware/issues/18248

  • nixpacks

    App source + Nix packages + Docker = Image

  • I think this is true for Nix in the deployment/ops space, where debugging a broken build can be very frustrating. Language improvements are going to be less useful for app developers, the Flake learning curve is not going to get better with a type system.

    Perhaps something like heroku buildpaks (https://github.com/railwayapp/nixpacks ?) would help devs get on the Nix train.

  • nix

    Nix, the purely functional package manager (by nix-windows)

  • There was some work being done to make Nix work on Windows [0] - but it might have fizzled out. I too would really love Nix to work on Windows. I already use it on both macOS and Linux and it’s great.

    [0] - https://github.com/nix-windows/nix

  • nix-portable

    Nix - Static, Permissionless, Installation-free, Pre-configured

  • Not entirely true, there are many ways in which you can use a custom location and still take advantage of the binary cache. You can do it with chroot, file system namespaces, bind mounts and so on. There's also a nice user friendly tool that does exactly this [1].

    [1]: https://github.com/DavHau/nix-portable

  • nix-ld

    Run unpatched dynamic binaries on NixOS

  • As someone who has been using NixOS for a couple of years now, I really want to say how appreciative I am of everybody for making noticeable improvements to the system on a somewhat regular basis. The nix command keeps on adding great new features like flake templates and bundling as well as just being more user friendly (error messages, actionable hints, etc.) Additionally, tools like nix-ld [1] make nix more usable than ever with software from external sources. Things just keep on getting better for NixOS users!

    Despite the reputation, I feel that NixOS or some derivative of it has the power to become the best distribution for non-technical users in the long run. What NixOS has done is effectively built an interface to every component of a modern Linux system, all that needs to be built is a user application to take advantage of it. Of course, there still needs be some improvements in Nix itself for it to blossom into its final form, but I really see a path to greatness here.

    I have often thought about creating a simple unified Win2K-esq or BeOS-like X11 WM/DE specifically for NixOS but unfortunately I like the time/motivation.

    [1] https://github.com/Mic92/nix-ld

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts