nixos/npm: enable using a specific nodejs package
This commit is contained in:
parent
75fa5ad17c
commit
16243290e2
|
@ -13,7 +13,14 @@ in
|
||||||
programs.npm = {
|
programs.npm = {
|
||||||
enable = mkEnableOption "<command>npm</command> global config";
|
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;
|
type = lib.types.lines;
|
||||||
description = ''
|
description = ''
|
||||||
The system-wide npm configuration.
|
The system-wide npm configuration.
|
||||||
|
@ -40,7 +47,7 @@ in
|
||||||
|
|
||||||
environment.variables.NPM_CONFIG_GLOBALCONFIG = "/etc/npmrc";
|
environment.variables.NPM_CONFIG_GLOBALCONFIG = "/etc/npmrc";
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.nodePackages.npm ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue