helm/modules/dev/node.nix
Henrik Lissner 05a12cd80d
Rewrite & add dev modules
For python, rust, love2D/lua, and node
2020-01-12 19:49:29 -05:00

24 lines
643 B
Nix

{ config, lib, pkgs, ... }:
{
imports = [ ./. ];
my = {
packages = with pkgs; [
nodejs
nodePackages.javascript-typescript-langserver
];
env.NPM_CONFIG_USERCONFIG = "$XDG_CONFIG_HOME/npm/config";
env.NPM_CONFIG_CACHE = "$XDG_CACHE_HOME/npm";
env.NPM_CONFIG_TMP = "$XDG_RUNTIME_DIR/npm";
env.NPM_CONFIG_PREFIX = "$XDG_CACHE_HOME/npm";
env.NODE_REPL_HISTORY = "$XDG_CACHE_HOME/node/repl_history";
env.PATH = [ "$(yarn global bin)" ];
# Run locally installed bin-script, e.g. n coffee file.coffee
alias.n = "PATH=\"$(npm bin):$PATH\"";
alias.ya = "yarn";
};
}