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

View File

@ -6,7 +6,7 @@
# Javascript
nodejs
nodePackages.yarn
nodePackages.pnpm
unstable.nodePackages.pnpm
# PHP
php
# Python
@ -23,4 +23,15 @@
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
'';
}