Skip to content

Commit 6838142

Browse files
committed
add idx support
1 parent 54b9a01 commit 6838142

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.idx/dev.nix

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# To learn more about how to use Nix to configure your environment
2+
# see: https://developers.google.com/idx/guides/customize-idx-env
3+
{ pkgs, ... }: {
4+
# Which nixpkgs channel to use.
5+
channel = "stable-23.11"; # or "unstable"
6+
7+
# Use https://search.nixos.org/packages to find packages
8+
packages = [
9+
pkgs.corepack_20
10+
];
11+
12+
# Sets environment variables in the workspace
13+
env = {};
14+
idx = {
15+
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
16+
extensions = [
17+
"svelte.svelte-vscode"
18+
];
19+
20+
# Enable previews
21+
previews = {
22+
enable = true;
23+
previews = {
24+
web = {
25+
cwd = "apps/codingcatdev";
26+
command = ["pnpm" "run" "dev" "--port" "$PORT" "--host" "0.0.0.0"];
27+
manager = "web";
28+
};
29+
};
30+
};
31+
32+
# Workspace lifecycle hooks
33+
workspace = {
34+
onCreate = {
35+
pnpm-install = "pnpm install";
36+
};
37+
# Runs when the workspace is (re)started
38+
onStart = {
39+
# Example: start a background task to watch and re-build backend code
40+
# watch-backend = "npm run watch-backend";
41+
};
42+
};
43+
};
44+
}

0 commit comments

Comments
 (0)