fix: enable installing npm modules globally

This commit is contained in:
Michael Thomas 2023-08-11 19:42:33 -04:00
parent 8b4c771201
commit 8928ada527

@ -6,7 +6,7 @@
# Javascript # Javascript
nodejs nodejs
nodePackages.yarn nodePackages.yarn
nodePackages.pnpm unstable.nodePackages.pnpm
# PHP # PHP
php php
# Python # Python
@ -23,4 +23,15 @@
extensions = [ "rust-src" ]; extensions = [ "rust-src" ];
}) })
]; ];
home.file.npmrc = {
enable = true;
target = ".npmrc";
text = ''
prefix = ''${HOME}/.npm-packages
'';
};
programs.zsh.initExtra = ''
export PATH=~/.npm-packages/bin:$PATH
export NODE_PATH=~/.npm-packages/lib/node_modules
'';
} }