add devshell for nodejs

This commit is contained in:
Adithya 2023-12-30 14:45:56 +05:30
parent bee99d02ec
commit fb8c172b04
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
2 changed files with 12 additions and 0 deletions

View file

@ -26,6 +26,7 @@
haskell = import ./shells/haskell.nix { inherit pkgs; }; haskell = import ./shells/haskell.nix { inherit pkgs; };
python = import ./shells/python.nix { inherit pkgs; }; python = import ./shells/python.nix { inherit pkgs; };
rust = import ./shells/rust.nix { inherit pkgs; }; rust = import ./shells/rust.nix { inherit pkgs; };
node = import ./shells/node.nix { inherit pkgs; };
}; };
} }
); );

11
shells/node.nix Normal file
View file

@ -0,0 +1,11 @@
{ pkgs }: pkgs.mkShell {
packages = with pkgs; [
nodejs_20
yarn
];
shellHook = ''
export npm_config_prefix="$PWD/.nix/npm/prefix"
export npm_config_cache="$PWD/.nix/npm/cache"
export PATH="$npm_config_prefix/bin:$PATH"
'';
}