Suggestion: shell.nix in project template

I wrote this expression as an example and I think it works pretty OK.

{
  pkgs ? import <nixpkgs> {}
}:
pkgs.mkShell {
  name="rw";
  buildInputs = with pkgs; [
    nodejs
    yarn # Yarn is required by RedwoodJS
  ];
  shellHook = ''
    yarn # Install dependencies automatically
    alias rw="yarn redwood" # Create an alias for the redwood CLI
    # TODO: Source some shell completions (if they exist)
  '';
}
2 Likes