Skip to content

Commit 846315e

Browse files
committed
add flake
1 parent df28f5a commit 846315e

File tree

4 files changed

+48
-1
lines changed

4 files changed

+48
-1
lines changed

.envrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
dist
3-
*~
3+
*~
4+
.direnv

flake.lock

+25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
description = "A Nix-flake-based Node.js development environment";
3+
4+
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
5+
6+
outputs = { self, nixpkgs }:
7+
let
8+
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
9+
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
10+
pkgs = import nixpkgs { inherit system; };
11+
});
12+
in
13+
{
14+
devShells = forEachSupportedSystem ({ pkgs }: {
15+
default = pkgs.mkShell {
16+
packages = with pkgs; [ node2nix nodejs nodePackages.pnpm nodePackages.typescript-language-server ];
17+
};
18+
});
19+
};
20+
}

0 commit comments

Comments
 (0)