File tree 1 file changed +60
-0
lines changed 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change
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-24.05" ; # or "unstable"
6
+ services . docker . enable = true ;
7
+
8
+ # Use https://search.nixos.org/packages to find packages
9
+ packages = [
10
+ pkgs . jdk21
11
+ pkgs . maven
12
+ pkgs . nodejs_20
13
+ ] ;
14
+
15
+ # Sets environment variables in the workspace
16
+ env = { } ;
17
+ idx = {
18
+ # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
19
+ extensions = [
20
+ "vscodevim.vim"
21
+ "redhat.java"
22
+ "vscjava.vscode-java-debug"
23
+ "vscjava.vscode-java-dependency"
24
+ "vscjava.vscode-java-pack"
25
+ "vscjava.vscode-java-test"
26
+ "vscjava.vscode-maven"
27
+ "Pivotal.vscode-boot-dev-pack"
28
+ "vmware.vscode-spring-boot"
29
+ "vscjava.vscode-spring-boot-dashboard"
30
+ "vscjava.vscode-spring-initializr"
31
+ "java-extension-pack-jdk"
32
+ ] ;
33
+
34
+ # Enable previews
35
+ previews = {
36
+ enable = true ;
37
+ previews = {
38
+ web = {
39
+ command = [ "mvn" "spring-boot:run" "-Dspring-boot.run.jvmArguments=-Dserver.port=$PORT" ] ;
40
+ manager = "web" ;
41
+ env = {
42
+ PORT = "$PORT" ;
43
+ } ;
44
+ } ;
45
+ } ;
46
+ } ;
47
+
48
+ # Workspace lifecycle hooks
49
+ workspace = {
50
+ # Runs when a workspace is first created
51
+ onCreate = {
52
+ install = "mvn clean install" ;
53
+ npm-install = "cd frontend && npm install" ;
54
+ } ;
55
+ onStart = {
56
+ # run-server = "PORT=3000 mvn spring-boot:run";
57
+ } ;
58
+ } ;
59
+ } ;
60
+ }
You can’t perform that action at this time.
0 commit comments