feat(nodejs): add enable option

This commit is contained in:
2026-05-22 09:51:59 +02:00
parent e5fad8a398
commit 36948fa1e9
2 changed files with 12 additions and 5 deletions

View File

@@ -85,6 +85,7 @@
docker.enable = true; docker.enable = true;
infra.enable = true; infra.enable = true;
go.enable = true; go.enable = true;
nodejs.enable = true;
ticketing.enable = true; ticketing.enable = true;
vscode.enable = true; vscode.enable = true;

View File

@@ -5,15 +5,21 @@
... ...
}: }:
let
cfg = config.nodejs;
in
{ {
options.nodejs.package = lib.mkOption { options.nodejs = {
enable = lib.mkEnableOption "Node.js";
package = lib.mkOption {
type = lib.types.package; type = lib.types.package;
default = pkgs.nodejs_24; default = pkgs.nodejs_24;
}; };
};
config = { config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
config.nodejs.package cfg.package
pnpm pnpm
yarn yarn
biome biome