Try Coding Classes

Installing Nix

In this module, we'll be installing Nix.


Just because programs depend on other programs, every modern computer system has some sort of package management system. On windows, we have the installers, on macos we have the dmg images, pkg scripts, on GNU/Linux we have apt-get, yum, pacman and so on.

Likewise, Nix is a package management system as well. It's available on windows, macos and GNU/Linux. Its main sell is that it helps us materialise declarative and reproducible builds and deployments.


In the world of cloud computing (huge employer), we build a system, like we install an operating system on our laptops. So we need to provision the underlying host systems and the programs needed to serve our custom program, ie the app.

Normally, an engineer would spawn a cloud vps, and then run a bunch of commands to install & configure the required programs and then, serve the app. With nix, we have formulated this process (of installing, configuring and running programs) in a structured and organized ecosystem.

We have the recipes for installing open-source programs using the nix system, online already, on the open source nix package repository.

For starters, we just name the program in a build file, and voila, nix installs it when run. But before we can get there, in this module, we'll be installing the nix package management system itself.


Join!

Just hop in the group to get started.


PS: Nix jobs are niche. You'd want to do nix because you understand (or take the community word), that it fits in the optimal way of building complex cloud computing arrangements.

The boundaries are endless in cloud computing systems. With the right toolkit, people can operate a growing fleet of collaborating computers tasked at a moving target. Not a trivial feat at all.

As new parts are added to the growing system, things become increasingly complicated to tame. This starts to requires specialised expertise.

It is, in this zone, that nix fits in. We are pretty much guaranteed, that with the right spell, we'll get the exactly what we declared.

The fact that all of the concerns of package management, can be described in light weight *.nix files is where nix gets its complexity from. Suddenly you need to anticipate, foresee and encode all the concerns & edge-cases of package management, in a domain specific language & infrastructure of its own.