-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
36 lines (34 loc) · 1.04 KB
/
flake.nix
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
35
36
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
let
mkDevShell = system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
pkgs.mkShell {
buildInputs = with pkgs; [
nodejs_20
nodePackages.typescript
nodePackages.typescript-language-server
nodePackages.prettier
nodePackages.pnpm
];
shellHook = ''
echo "Node.js: $(node --version)"
echo "pnpm: $(pnpm --version)"
'';
};
in
(flake-utils.lib.eachDefaultSystem (system: {
devShells.default = mkDevShell system;
})) // {
devShells.aarch64-darwin.default = mkDevShell "aarch64-darwin";
devShells.x86_64-darwin.default = mkDevShell "x86_64-darwin";
devShells.aarch64-linux.default = mkDevShell "aarch64-linux";
devShells.x86_64-linux.default = mkDevShell "x86_64-linux";
};
}