Here’s a short pitch I used recently:
title: 'How and why I use Nix’
I develop a project, using
How to ensure that you can easily use, or continue development on, the project?
Or myself, six months from now when I’ve forgotten how it works?
Also: dependency nightmares
- Package X will only work with certain versions of package Y.
- Package Y will only work with certain versions of package Z.
- and so on…
If I install the version of package X needed for your project,
it will overwrite the version of package X I need for my project!
Nix vs Docker
Nix vs Docker : suggestion
Use Nix to package software or a development environment.
Use Docker if you really need the container features, e.g.
- a specific OS
- communication between multiple “machines”
Can also use Nix to build Docker containers.
Technically an experimental feature, but…
- Been around for years
- Widespread adoption
Where to get Nix
I recommend the installer and quick start guide from zero-to-nix.com.
More documentation (and another installer) available at nixos.org.
Not Nix-specific, but very useful.
Automatically load the right environment when you CD to a directory.
Available from direnv.net
An operating system based on Nix.
Available at nixos.org.
Something to be aware of
There are hyphenated and unhyphenated versions of many commands
The unhyphenated versions are for working directly with flakes
The hyphenated versions are for everything else
nix shell are two different commands