Skip to content

Commit 52b589a

Browse files
committed
tmp for idx testing
1 parent 3ea80c1 commit 52b589a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

dataconnect/dev.nix

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{ pkgs, ... }: {
2+
channel = "stable-23.11";
3+
packages = [
4+
pkgs.nodejs_20
5+
];
6+
7+
env = {
8+
POSTGRESQL_CONN_STRING = "postgresql://user:mypassword@localhost:5432/dataconnect?sslmode=disable";
9+
};
10+
11+
idx.extensions = [
12+
"mtxr.sqltools"
13+
"mtxr.sqltools-driver-pg"
14+
"GraphQL.vscode-graphql-syntax"
15+
"GoogleCloudTools.firebase-dataconnect-vscode"
16+
];
17+
18+
services.postgres = {
19+
extensions = ["pgvector"];
20+
enable = true;
21+
};
22+
23+
idx = {
24+
workspace = {
25+
onCreate = {
26+
update-firebase = "npm install -D firebase-tools";
27+
postgres = ''
28+
psql --dbname=postgres -c "ALTER USER \"user\" PASSWORD 'mypassword';"
29+
psql --dbname=postgres -c "CREATE DATABASE dataconnect;"
30+
psql --dbname=dataconnect -c "CREATE EXTENSION vector;"
31+
'';
32+
npm-install = "cd app && npm i && npm i firebase@latest";
33+
};
34+
};
35+
previews = {
36+
enable = true;
37+
previews = {
38+
web = {
39+
command = ["npm" "run" "dev" "--prefix" "./app" "--" "--port" "$PORT" "--host" "0.0.0.0"];
40+
manager = "web";
41+
};
42+
};
43+
};
44+
};
45+
}

0 commit comments

Comments
 (0)