From 9dad0ca18a9b689a0e119b33e18fd5bf195c7071 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 4 Oct 2019 16:32:12 +0200 Subject: Move javascript package setup to home-manager --- user/modules/javascript.nix | 50 +++++++++++++++++++++++++++++++++++++++++++++ user/modules/satoshipay.nix | 4 ++++ 2 files changed, 54 insertions(+) create mode 100644 user/modules/javascript.nix (limited to 'user/modules') diff --git a/user/modules/javascript.nix b/user/modules/javascript.nix new file mode 100644 index 00000000..eaae2ca1 --- /dev/null +++ b/user/modules/javascript.nix @@ -0,0 +1,50 @@ +{ config, pkgs, ... }: + +let + node = pkgs.unstable.nodejs-10_x; + npmPackages = pkgs.unstable.nodePackages_10_x; + node2nixPackages = import ../packages/node2nix/default.nix { + pkgs = pkgs.unstable; + nodejs = node; + }; +in +{ home.packages = (with pkgs.unstable; [ + node + ] ++ ( + if stdenv.isDarwin + then + [ + ] + else + [ + # npm install may use any of these + binutils + gcc + gnumake + python2 + ] + )) ++ (with npmPackages; [ + node-gyp + node-gyp-build + node-pre-gyp + + tern + node2nix + nodemon + javascript-typescript-langserver + typescript-language-server + vscode-css-languageserver-bin + vscode-html-languageserver-bin + csslint + eslint_d + prettier + typescript + + node2nixPackages.bunyan + node2nixPackages.pino-pretty + node2nixPackages."pnpm-3.6.2" + node2nixPackages.prettier_d + node2nixPackages.dockerfile-language-server-nodejs + node2nixPackages.yaml-language-server + ]); +} diff --git a/user/modules/satoshipay.nix b/user/modules/satoshipay.nix index 6feefbbb..ca396aad 100644 --- a/user/modules/satoshipay.nix +++ b/user/modules/satoshipay.nix @@ -6,6 +6,10 @@ let }; in { + imports = [ + ./javascript.nix + ]; + programs.git.includes = [ { condition = "gitdir:~/projects/github.com/satoshipay/"; -- cgit 1.4.1