1. 61
  1. 9

    Oh, is this a first “mainstream”/high-profile company using Nix and doing a public “coming out” about this? Or did I miss some earlier ones?

    1. 7

      There was the retailer Target, but I wouldn’t say they had a public coming out - https://github.com/target/lorri.

      1. 3

        This was my thought as well! Now nix will become a docker! Yay =)

        1. 18

          I say this as somebody who loves Nix. But many people will struggle with Nix’ learning curve and hate it. For all Docker’s failings, do not underestimate how much it is loved because you can just stash your a bunch of Unix commands in your Dockerfile and that’s mostly it.

          My worry is Nix getting too much exposure before all the rough edges are smoothed out. Though of course, exposure also brings in new contributors, which may help with that.

          1. 7

            So far our tooling takes care of (almost) everything and the magic happens under the hood. The developers didn’t have to directly interact with Nix yet. We’ll see how things change once developers need to write their own configurations/derivations in Nix. The developer behind all this effort has also released a series of videos introducing Nix in case you’re interested! https://www.youtube.com/watch?v=NYyImy-lqaA&list=PLRGI9KQ3_HP_OFRG6R-p4iFgMSK1t5BHs

            1. 2

              The documentation situation is a little frustrating. There’s actually too much documentation. It’s easy to accidentally get obsolete or out-of-order information. For example, the nix installer is totally broken on MacOS Catalina because root directories are locked down and it can’t manage /nix the way it wants. There’s a work around, but it’s only documented in the ~2000th comment on a github issue…

              Yes, I intend to make a contribution to correct this, but:

              1. I have to figure out how to do that for this project, which I’m new to
              2. I have to confirm the solution I found is the temporary official one
              3. This has been broken for a year and a fix is coming “soon,” so is it even worth documenting the current process?
              1. 2
                1. 1

                  This also works! https://dev.to/louy2/installing-nix-on-macos-catalina-2acb

                  curl -L https://raw.githubusercontent.com/NixOS/nix/d42ae78de9f92d60d0cd3db97216274946e8ba8e/scripts/create-darwin-volume.sh | sh
                  curl -L https://nixos.org/nix/install | sh

                  Although relying on a script that is no longer on master is definitely not a good idea, but… /shrug

              2. 1

                I strongly dislike docker containers and the whole ecosystem around dockerhub.

                However, the syntax of Dockerfiles is extremely beautiful. Probably my favorite file format ever. It is 100% understandable by anybody who has never heard about docker. If you ignored docker at all, you could still run dockerfiles “by hand” to reproduce the systems they describe. Sadly, the same thing cannot at all be said for nix files, in which quite a lot of implicit things happen and they are punctuation-ridden for unclear reasons.

                EDIT: I would love if a “lite”, less powerful, nix file format existed, where the graph is linearized and it has a dockerfile like feel (maybe using the exact same syntax).

                1. 9

                  As I understand it, the Nix expression language is not an essential part of the Nix ecosystem. As long as you generate valid .drv files, you can theoretically use any language, and still manage your system with Nix. I believe (though I’d love it if someone can confirm) that guix, while using guile scheme for expressions, still outputs the same .drv format[1].

                  Another example I know of is dhall-nix, which allows you to translate Dhall expressions into Nix expressions[2].

                  So in theory, as long as your config language of choice can be mapped to the Nix expression language, or a subset of it which you wish to use, you may be able to write a translator which converts it to a Nix expression. Alternatively, you can write a compiler which outputs .drv files directly.

                  [1] https://guix.gnu.org/manual/en/html_node/Derivations.html

                  [2] http://www.haskellforall.com/2017/01/typed-nix-programming-using-dhall.html

                  1. 1

                    It really depends what you mean with essential. Without Nix the programming language, Nix is much closer to being yet another Hermetic build system.

                    I try to make that point more elaborately here :


                  2. 1

                    Without knowing a lot about nix, having a graph instead of a linear set of instructions makes caching much more powerful. I’ve sat through many painfully long Docker builds because the thing I had to change was coincidentally located early in the Dockerfile. If every single thing in your image is immutable and created in a static order, I would imagine that build times would be completely unmanageable.

            2. -9

              Author: Let’s rewrite everything in Nix!

              Also author: I don’t really understand Nix

              1. 12

                Also author: I don’t really understand Nix

                Perhaps you could highlight the parts of the article which you believe are incorrect or show lack of understanding, so that we can all learn something…