summary refs log tree commit diff stats
path: root/user/modules
diff options
context:
space:
mode:
Diffstat (limited to 'user/modules')
-rw-r--r--user/modules/javascript.nix50
-rw-r--r--user/modules/satoshipay.nix4
2 files changed, 54 insertions, 0 deletions
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/";