From 5be304a9bbef26bf06f8fd5fdf06d4e8529a5344 Mon Sep 17 00:00:00 2001 From: Asher Date: Fri, 19 Jan 2024 12:27:41 -0900 Subject: [PATCH] chore: make yarn use the right version of node Otherwise if for example you try to run `yarn storybook` it complains that the version of Node is wrong. `pnpm storybook` works fine and maybe that is what we should use, but as long as we have yarn installed might as well make it do the right thing. --- flake.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index e7671015c79f2..f3322d9c7761c 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,8 @@ # Workaround for: terraform has an unfree license (‘bsl11’), refusing to evaluate. pkgs = import nixpkgs { inherit system; config.allowUnfree = true; }; formatter = pkgs.nixpkgs-fmt; + nodejs = pkgs.nodejs-18_x; + yarn = pkgs.yarn.override { inherit nodejs; }; # Check in https://search.nixos.org/packages to find new packages. # Use `nix --extra-experimental-features nix-command --extra-experimental-features flakes flake update` # to update the lock file if packages are out-of-date. @@ -46,11 +48,11 @@ libuuid mockgen nfpm - nodejs-18_x - nodejs-18_x.pkgs.pnpm - nodejs-18_x.pkgs.prettier - nodejs-18_x.pkgs.typescript - nodejs-18_x.pkgs.typescript-language-server + nodejs + nodejs.pkgs.pnpm + nodejs.pkgs.prettier + nodejs.pkgs.typescript + nodejs.pkgs.typescript-language-server openssh openssl pango