Skip to content

Commit bd04bde

Browse files
committed
Add a nix flake for local development
[no-changelog-required]
1 parent 06c761f commit bd04bde

File tree

3 files changed

+97
-0
lines changed

3 files changed

+97
-0
lines changed

.envrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
use flake
2+
3+
source_env_if_exists .envrc.local

flake.lock

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
description = "fastify-renderer development environment";
3+
4+
inputs = {
5+
flake-utils.url = "github:numtide/flake-utils";
6+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
7+
};
8+
9+
outputs = { self, flake-utils, nixpkgs }:
10+
(flake-utils.lib.eachSystem [
11+
"x86_64-linux"
12+
"x86_64-darwin"
13+
"aarch64-darwin"
14+
]
15+
(system: nixpkgs.lib.fix (flake:
16+
let
17+
pkgs = nixpkgs.legacyPackages.${system};
18+
in
19+
rec {
20+
21+
packages =
22+
rec {
23+
bash = pkgs.bash;
24+
nodejs = pkgs.nodejs-18_x;
25+
pnpm = pkgs.nodePackages.pnpm;
26+
};
27+
28+
devShell = pkgs.mkShell {
29+
packages = builtins.attrValues packages;
30+
};
31+
}
32+
)));
33+
}

0 commit comments

Comments
 (0)