about summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2020-04-13 07:44:05 -0500
committerGitHub <noreply@github.com>2020-04-13 07:44:05 -0500
commit66e43c6588049a4cbe4e758bfde3f1994e4b917d (patch)
tree9364157e9f2db9fb0b173d72a3f6402589f3ee56 /nixos/modules/programs
parentf6e64feb14bbc35fe1cd160f28094321c6e685fa (diff)
parent16243290e2cf5cb6f80c7699e3c37f26d114873f (diff)
downloadnixlib-66e43c6588049a4cbe4e758bfde3f1994e4b917d.tar
nixlib-66e43c6588049a4cbe4e758bfde3f1994e4b917d.tar.gz
nixlib-66e43c6588049a4cbe4e758bfde3f1994e4b917d.tar.bz2
nixlib-66e43c6588049a4cbe4e758bfde3f1994e4b917d.tar.lz
nixlib-66e43c6588049a4cbe4e758bfde3f1994e4b917d.tar.xz
nixlib-66e43c6588049a4cbe4e758bfde3f1994e4b917d.tar.zst
nixlib-66e43c6588049a4cbe4e758bfde3f1994e4b917d.zip
Merge pull request #84599 from doronbehar/nodejs-python3
nodejs: use python3 if possible
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/npm.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/nixos/modules/programs/npm.nix b/nixos/modules/programs/npm.nix
index b351d80c7acf..f101a44587a1 100644
--- a/nixos/modules/programs/npm.nix
+++ b/nixos/modules/programs/npm.nix
@@ -13,7 +13,14 @@ in
     programs.npm = {
       enable = mkEnableOption "<command>npm</command> global config";
 
-      npmrc = lib.mkOption {
+      package = mkOption {
+        type = types.path;
+        description = "The npm package version / flavor to use";
+        default = pkgs.nodePackages.npm;
+        example = literalExample "pkgs.nodePackages_13_x.npm";
+      };
+
+      npmrc = mkOption {
         type = lib.types.lines;
         description = ''
           The system-wide npm configuration.
@@ -40,7 +47,7 @@ in
 
     environment.variables.NPM_CONFIG_GLOBALCONFIG = "/etc/npmrc";
 
-    environment.systemPackages = [ pkgs.nodePackages.npm ];
+    environment.systemPackages = [ cfg.package ];
   };
 
 }