added devshell

This commit is contained in:
ari committed 2025-11-13 10:57:46 -05:00
1 parent 2935827f60
commit 0c6d89e38b
1 file changed
+28
+28
View File
@@ -0,0 +1,28 @@
{
description = "A TypeScript project with Nix flakes";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
nodejs = pkgs.nodejs_20; # or nodejs_22, etc.
in
{
devShells.default = pkgs.mkShell {
buildInputs = [
nodejs
];
shellHook = ''
echo "TypeScript dev environment loaded"
echo "Node.js: $(node --version)"
'';
};
}
);
}