3 ms·
> Would Nix allow me to specify/run different R and R package versions for projects in different locations/folders? Yep! You can even easily integrate Nix with
by pxc 4y ago
> Would Nix allow me to specify/run different R and R package versions for projects in different locations/folders?
Yep! You can even easily integrate Nix with direnv so that it magically grabs the right tools and puts them on your path whenever you cd into the project directory. Many editors and IDEs also have plugins that integrate with direnv, so you can oftentimes get them to integrate with those runtimes even without starting them from the project directory.
Nix has pretty good support for this built in (shell.nix and flake.nix), but you'll probably find that some opinionated tooling is nicer for just jumping in. The Nix ecosystem is rich, divergent, and competitive, so there are often a lot of tools designed to leverage or enhance it all competing in a given single problem space. This can be overwhelming. Here's my recommendation for getting started with Nix for project environments today: https://devenv.sh/ https://devenv.sh/
It supports R, it's based on some of the nicest tools in the Nix ecosystem, it has great documentation overall (though incomplete), development is very active, and the author and maintainer is longtime contributor in the Nix community with a strong reputation (he served as NixOS release manager several times!). I've only taken it up recently myself, but I use it every day at work and I'm very happy with it.
Definitely go to NixOS Discourse or Matrix if you have questions and people can help point you to the best docs as you get acclimated.