Skip to content

Commit

Permalink
Add Nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasWanke committed May 23, 2024
1 parent 629a735 commit a8b0312
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 0 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.direnv/

# compiled output
/dist
/node_modules
Expand Down
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [
(final: prev: rec {
nodejs = prev.nodejs_18;
pnpm = (prev.nodePackages.pnpm.override { inherit nodejs; });
})
];
pkgs = import nixpkgs { inherit overlays system; };
in {
devShell = with pkgs; mkShell { buildInputs = [ docker nodejs pnpm ]; };
});
}

0 comments on commit a8b0312

Please sign in to comment.