added devshell
This commit is contained in:
1 parent
2935827f60
commit
0c6d89e38b
1 file changed
+28
@@ -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)"
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user