
It allows us to have simultaneous installations of various versions of tools-such as Python-required for our projects. Nix is a great tool to set up development environments. Categories Code, Guides Tags GNU, Linux, Nix, R Leave a comment Using Nix to Create Python Virtual Environments It creates a subdirectory in your project root, _libs, where the project’s R user library is located.

This makes available R with ggplot, plyr, tidyr and devtools. We can use Nix to specify a unique library directory per project.įor example, create a nix.shell in your project root as follows: with import Īctivate it in your shell by running $ nix-shell. The user library directories can be specified through the R_LIBS_USER environment variable.

By default these package management tools install packages in the first-specified user library directory. R looks for installed packages in the R library directories, of which there are two types: the system library and the user library. However, sometimes it is useful to manage packages through the various R tools such as the built-in install.packages or install utilities provided by the devtools package. The straightforward approach is to let Nix handle all R package management. An important benefit of this is the ability to have different (incompatible) versions of the same packages for different projects. This means we can have different simultaneous R installations for different projects and keep the installed packages for each project separated. Previously we saw how to use Nix to create virtual environments for Python.

Categories Code, Guides Tags Linux, xmonad 2 Comments Granting Capabilities Using capsh Note that you can give your layouts custom names through Renamed. For this we define a utility function: import XMonad This can be accomplished by looking up the active layout in the hook. In xmonad it can be useful to have different keybindings for different layouts, or respond to other events differently depending on the active layout.
