-
Notifications
You must be signed in to change notification settings - Fork 302
Expand file tree
/
Copy pathflake.nix
More file actions
34 lines (32 loc) · 775 Bytes
/
flake.nix
File metadata and controls
34 lines (32 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
nixpkgs-nodejs.url = "github:nixos/nixpkgs/6ad174a6dc07c7742fc64005265addf87ad08615"; # Node.js 22.14.0
};
outputs = {
self,
nixpkgs,
nixpkgs-nodejs,
}: let
forEachSystem = nixpkgs.lib.genAttrs [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
in {
devShells = forEachSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {
packages = with nixpkgs-nodejs.legacyPackages.${system}; [
nodejs_22
(yarn.override { nodejs = nodejs_22; })
];
shellHook = ''
export PATH="$(pwd)/node_modules/.bin:$PATH"
'';
};
});
};
}