Skip to content

Commit

Permalink
Add nix development flake (#4)
Browse files Browse the repository at this point in the history
* #3 Add development flake
* #3 Migrate node versions to match development flake
  • Loading branch information
danielemery authored Oct 5, 2023
1 parent 76185b4 commit 62afb9b
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 1 deletion.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.18.0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16 as node
FROM node:18.18.0 as node

FROM nginx
ARG DOCKER_REACT_VERSION
Expand Down
27 changes: 27 additions & 0 deletions flake.lock

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

26 changes: 26 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
description = "Docker React Development Environment";

inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; };

outputs = { self, nixpkgs }:
let
inherit (nixpkgs.lib) genAttrs;
supportedSystems = [
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
];
forAllSystems = f: genAttrs supportedSystems (system: f system);
in {
devShells = forAllSystems (system:
let pkgs = import nixpkgs { inherit system; };
in {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs-18_x
];
};
});
};
}

0 comments on commit 62afb9b

Please sign in to comment.