-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: added nix flake to pin node + env variables
- Loading branch information
1 parent
873ba57
commit f8ab715
Showing
4 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake . |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ docs | |
coverage | ||
|
||
dist | ||
.direnv | ||
!flake.lock | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
description = ""; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = | ||
{ self | ||
, nixpkgs | ||
, flake-utils | ||
} @inputs: | ||
flake-utils.lib.eachDefaultSystem | ||
(system: | ||
let | ||
inherit (nixpkgs) lib; | ||
distDir = ".dist"; | ||
pkgs = import nixpkgs | ||
{ | ||
inherit system; | ||
config = { }; | ||
overlays = [ ]; | ||
}; | ||
cwd = (builtins.toString ./.); | ||
in | ||
{ | ||
|
||
devShells.default = pkgs.mkShell { | ||
packages = with pkgs;[ | ||
nodejs_22 | ||
nodejs_22.pkgs.pnpm | ||
]; | ||
shellHook = '' | ||
export NPM_TOKEN=$(cat $SECRETS_DIR/NPM_TOKEN) | ||
export GH_TOKEN=$(cat $SECRETS_DIR/GH_TOKEN) | ||
echo "node `${pkgs.nodejs}/bin/node --version`" | ||
echo "pnpm `${pkgs.nodePackages.pnpm}/bin/pnpm --version`" | ||
''; | ||
}; | ||
}); | ||
} |