From 56c2b3a73aa6efcd60fe1f75640b5d5ac7c45933 Mon Sep 17 00:00:00 2001 From: moons-14 Date: Mon, 1 Dec 2025 13:32:55 +0900 Subject: [PATCH] java --- modules/core/packages.nix | 4 ++++ modules/home/vscode.nix | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/modules/core/packages.nix b/modules/core/packages.nix index e7cc069..4d983c5 100644 --- a/modules/core/packages.nix +++ b/modules/core/packages.nix @@ -21,6 +21,8 @@ in zsh = { enable = true; }; + java.enable = true; + java.package = pkgs.jdk21; }; nixpkgs.config.allowUnfree = true; @@ -45,5 +47,7 @@ in unstable.ghostty sbctl xwayland-satellite slurp grim wf-recorder + sqlite # Vscode Raycast Extension Dependency + jdk21 maven gradle ]; } diff --git a/modules/home/vscode.nix b/modules/home/vscode.nix index 68173ec..1710b2a 100644 --- a/modules/home/vscode.nix +++ b/modules/home/vscode.nix @@ -98,6 +98,34 @@ let ]; userSettings = {}; }; + + java = { + extensions = (with vsc; [ + vscjava.vscode-java-pack + sonarsource.sonarlint-vscode + ]); + + userSettings = { + "java.jdt.ls.java.home" = "${pkgs.jdk21.home}"; + "java.configuration.runtimes" = [ + { + "name" = "JavaSE-21"; + "path" = "${pkgs.jdk21.home}"; + "default" = true; + } + ]; + + "java.jdt.ls.vmargs" = + "-Xms256m -Xmx2G -XX:+UseG1GC -XX:+UseStringDeduplication"; + + "java.configuration.updateBuildConfiguration" = "interactive"; + + "java.maven.downloadSources" = true; + "java.eclipse.downloadSources" = true; + + "maven.executable.path" = "${pkgs.maven}/bin/mvn"; + }; + }; }; combine = (ls: @@ -129,6 +157,8 @@ in { web = mkProfile [ layers.common layers.web ] { }; jupyter = mkProfile [ layers.common layers.jupyter ] { }; + + java = mkProfile [ layers.common layers.java ] { }; }; };