Skip to content

Commit

Permalink
Add basic nix configuration for devenv
Browse files Browse the repository at this point in the history
  • Loading branch information
macalinao committed Nov 30, 2023
1 parent 847973f commit 8eec14c
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
use flake
watch_file flake.nix
watch_file flake.lock
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.

24 changes: 24 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
description = "Node.js development environment.";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
nodejs = pkgs.nodejs-18_x;
in
{
devShell =
pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
(yarn.override { inherit nodejs; })
];
};
});
}

0 comments on commit 8eec14c

Please sign in to comment.