Skip to content

Commit 7dbda0f

Browse files
committed
Add IDX
1 parent d5c34dd commit 7dbda0f

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.idx/dev.nix

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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.flutter
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+
"Dart-Code.dart-code"
18+
"Dart-Code.flutter"
19+
];
20+
21+
# Enable previews
22+
previews = {
23+
enable = true;
24+
previews = {
25+
# web = {
26+
# # Example: run "npm run dev" with PORT set to IDX's defined port for previews,
27+
# # and show it in IDX's web preview panel
28+
# command = ["npm" "run" "dev"];
29+
# manager = "web";
30+
# env = {
31+
# # Environment variables to set for your server
32+
# PORT = "$PORT";
33+
# };
34+
# };
35+
};
36+
};
37+
38+
# Workspace lifecycle hooks
39+
workspace = {
40+
# Runs when a workspace is first created
41+
onCreate = {
42+
updateStable = "flutter channel stable && flutter upgrade && flutter pub get";
43+
};
44+
# Runs when the workspace is (re)started
45+
onStart = {
46+
# Example: start a background task to watch and re-build backend code
47+
# watch-backend = "npm run watch-backend";
48+
};
49+
};
50+
};
51+
}

0 commit comments

Comments
 (0)