Skip to content

Commit

Permalink
add shell.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
plebhash committed Apr 29, 2024
1 parent b357a45 commit 11fa080
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ pkgs ? import <nixpkgs> {} }:

let
nvmVersion = "0.38.0";
in

pkgs.mkShell {
buildInputs = [
pkgs.nodejs
pkgs.git
];

shellHook = ''
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
'';

# Install nvm
postShellHooks = ''
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v${nvmVersion}/install.sh | bash
'';
}

0 comments on commit 11fa080

Please sign in to comment.