what is it?

fast, declarative, reproducible and composable developer environments using nix

installation

non-nixos

nix profile install --accept-flake-config nixpkgs#devenv

nixos

add to configuration.nix

configuration.nix
environment.systemPackages = [ 
  pkgs.devenv
];

project initialisation

if not done already, add user to trusted-users. for non-nixos, edit /etc/nix/nix.conf

echo "trusted-users = root ${USER}" | sudo tee -a /etc/nix/nix.conf && sudo pkill nix-daemon

cd into project, and initialise the devenv shell

nix flake init --template github:cachix/devenv

to update a flake template already in the nix store

nix flake init --template github:cachix/devenv --refresh

if direnv is installed, you might have to stop the process, as devenv needs all files to be tracked first in the repo, other wise it seems like it installs more packages?

# allow git to track the devenv artifacts
git add .