Last active
March 15, 2024 20:55
-
-
Save danielres/2a45362178636577965268d054278a68 to your computer and use it in GitHub Desktop.
Nix flake with node_20 + pnpm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use_flake './flake.nix' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Flake with nodejs_20 + pnpm"; | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = { self, nixpkgs, flake-utils, ... }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = import nixpkgs { | |
inherit system; | |
}; | |
in { | |
devShell = pkgs.mkShell { | |
buildInputs = [ | |
pkgs.nodejs_20 | |
pkgs.nodejs_20.pkgs.pnpm | |
# pkgs.nodejs_20.pkgs.yarn | |
]; | |
# Setup environment variables if necessary | |
shellHook = '' | |
export SOME_VAR="value" | |
''; | |
}; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment