From 665e5e1058f79255a160e063481da8ad0824d16f Mon Sep 17 00:00:00 2001 From: nathfavour <116535483+nathfavour@users.noreply.github.com> Date: Mon, 11 Nov 2024 19:53:35 -0800 Subject: [PATCH 1/2] open in idx --- .idx/dev.nix | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .idx/dev.nix diff --git a/.idx/dev.nix b/.idx/dev.nix new file mode 100644 index 00000000..6e2d3853 --- /dev/null +++ b/.idx/dev.nix @@ -0,0 +1,47 @@ +# To learn more about how to use Nix to configure your environment +# see: https://developers.google.com/idx/guides/customize-idx-env +{pkgs}: { + # Which nixpkgs channel to use. + channel = "stable-23.11"; # or "unstable" + # Use https://search.nixos.org/packages to find packages + packages = [ + pkgs.nodejs_20 + pkgs.yarn + pkgs.nodePackages.pnpm + pkgs.bun + pkgs.gh + ]; + # Sets environment variables in the workspace + env = {}; + idx = { + # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id" + extensions = [ + # "vscodevim.vim" + ]; + workspace = { + # Runs when a workspace is first created with this `dev.nix` file + onCreate = { + npm-install = "npm ci --no-audit --prefer-offline --no-progress --timing"; + # Open editors for the following files by default, if they exist: + default.openFiles = [ + # Cover all the variations of language, src-dir, router (app/pages) + "pages/index.tsx" "pages/index.jsx" + "src/pages/index.tsx" "src/pages/index.jsx" + "app/page.tsx" "app/page.jsx" + "src/app/page.tsx" "src/app/page.jsx" + ]; + }; + # To run something each time the workspace is (re)started, use the `onStart` hook + }; + # Enable previews and customize configuration + previews = { + enable = true; + previews = { + web = { + command = ["npm" "run" "dev" "--" "--port" "$PORT" "--hostname" "0.0.0.0"]; + manager = "web"; + }; + }; + }; + }; +} \ No newline at end of file From 775cb2e4ac82143528810caf61d4b71d32f1431d Mon Sep 17 00:00:00 2001 From: Andrew Pareles <43356051+andrewpareles@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:21:47 -0800 Subject: [PATCH 2/2] Update dev.nix --- .idx/dev.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.idx/dev.nix b/.idx/dev.nix index 6e2d3853..83eb293f 100644 --- a/.idx/dev.nix +++ b/.idx/dev.nix @@ -1,3 +1,4 @@ +# Created for Void # To learn more about how to use Nix to configure your environment # see: https://developers.google.com/idx/guides/customize-idx-env {pkgs}: { @@ -44,4 +45,4 @@ }; }; }; -} \ No newline at end of file +}