feat(nodjes): update 'npm' config
check / lint (push) Successful in 19s

This commit is contained in:
2026-09-27 20:59:21 +02:00
parent 0faf0ded8f
commit 0252eec4f0
2 changed files with 14 additions and 7 deletions
-3
View File
@@ -1,3 +0,0 @@
init.author.name=Hektor Misplon
init.author.email=hektor.misplon@gmail.com
init.license=MIT
+14 -4
View File
@@ -7,14 +7,12 @@
let
cfg = config.nodejs;
email = "contact@hektormisplon.xyz";
in
{
options.nodejs = {
enable = lib.mkEnableOption "Node.js";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.nodejs_24;
};
package = lib.mkPackageOption pkgs "nodejs_24" { };
};
config = lib.mkIf cfg.enable {
@@ -25,5 +23,17 @@ in
biome
tsx
];
programs.npm = {
inherit (cfg) enable package;
settings = {
prefix = "${config.xdg.dataHome}/npm";
cache = "${config.xdg.cacheHome}/npm";
init-module = "${config.xdg.configHome}/npm/config/npm-init.js";
init-author-name = "Hektor Misplon";
init-author-email = email;
init-license = "MIT";
};
};
};
}