This flake is for cloning into a NixOS or Nix enabled system with
direnv
andnix-direnv
installed1. It provides a development environment for R projects. It supports Intel and ARM architectures as well as Linux and Darwin operating systems.
- Clone this repository into your desired location.
- Run
direnv allow
to allow the environment to be loaded automatically.
The flake.lock file is used to pin the versions of the packages. The R
environment is set up with the following packages:
R version 4.4.1 (2024-06-14)
Quarto 1.5.57
Pandoc 3.1.11.1
Radian 0.6.13
You can modify the flake.nix file to include additional packages. Afterwards, the next shell command will trigger a rebuild of the environment.
You can update the flake.lock file by running nix flake update
. This will update the flake.lock file with the latest versions of the packages.
Footnotes
-
A direct installation of
nix-direnv
can be done withnix-env -iA nixpkgs.direnv
. For a longer-term solution, you can add it to yourconfiguration.nix
file. ↩