A collection of Nix flake templates ❄️
1{
2 description = "A Nix-flake-based Node development environment";
3
4 inputs = {
5 nixpkgs.url = "github:nixos/nixpkgs/release-25.05";
6 flake-utils.url = "github:numtide/flake-utils";
7 };
8
9 outputs = {
10 self,
11 nixpkgs,
12 flake-utils,
13 }:
14 flake-utils.lib.eachDefaultSystem
15 (system: let
16 pkgs = import nixpkgs {
17 inherit system;
18 };
19 in {
20 devShells.default = pkgs.mkShell {
21 buildInputs = [
22 pkgs.nodejs
23 # You can set the major version of Node.js to a specific one
24 # pkgs.nodejs-19_x
25
26 #pkgs.nodePackages.pnpm
27 pkgs.yarn
28
29 pkgs.nodePackages.typescript
30 pkgs.nodePackages.typescript-language-server
31 ];
32 };
33 });
34}