From 562dbdf811f75715ec129e59928a7f5e69482e0c Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Sun, 14 Jul 2024 21:11:13 +0200 Subject: [PATCH] Nixos: Add java env flake --- env/flake_java.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 env/flake_java.nix diff --git a/env/flake_java.nix b/env/flake_java.nix new file mode 100644 index 00000000..cb8e0e05 --- /dev/null +++ b/env/flake_java.nix @@ -0,0 +1,33 @@ +{ + description = "Java Environment"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + inputs.devshell.url = "github:numtide/devshell"; + + outputs = { + self, + nixpkgs, + flake-utils, + devshell, + }: + flake-utils.lib.eachDefaultSystem (system: let + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; # For clion + overlays = [devshell.overlays.default]; + }; + in { + devShell = pkgs.devshell.mkShell { + name = "Java Environment"; + + packages = with pkgs; [ + jdk22 + jdt-language-server + gradle + ]; + + commands = []; + }; + }); +}