Jump to the navigation menu

nix is like nvm, but for everything

I was recently explaining and demonstrating Nix and direnv to a colleague and showing how, when I moved into a directory, new packages or different versions of packages became available.

If I left the directory, I was reverted back to my global packages and versions.

In this demonstration, I was showing how I can have different versions of PHP and node for a particular project - replacing a lot of what I'd previously used tools like Vagrant and Docker for.

I came up with a comparison between Nix and nvm - the node version manager - a tool that allows you to install multiple versions of nodejs and switch between them.

Using Nix and direnv is more seamless, but it works for everything.

I'm able to switch versions of PHP, MySQL, MariaDB, PostgreSQL or anything else I need with Nix.

Not just node, and without needing containers.

- Oliver

Was this interesting?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an certified Drupal Triple Expert with 18 years of experience, a Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.