java: added lombok support
This commit is contained in:
parent
4dba11cb9d
commit
31b8f59214
|
@ -12,6 +12,7 @@
|
||||||
./git.nix
|
./git.nix
|
||||||
./github.nix
|
./github.nix
|
||||||
./go.nix
|
./go.nix
|
||||||
|
./java.nix
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
./jetbrains-idea.nix
|
./jetbrains-idea.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
|
|
28
home/programs/java.nix
Normal file
28
home/programs/java.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.profile.home.programs.java;
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
version = "1.18.36";
|
||||||
|
lombokJar = pkgs.fetchurl {
|
||||||
|
url = "https://projectlombok.org/downloads/lombok-${version}.jar";
|
||||||
|
sha256 = "sha256-c7awW2otNltwC6sI0w+U3p0zZJC8Cszlthgf70jL8Y4=";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
# This registers lombok jar to the Java classpath
|
||||||
|
# https://github.com/NixOS/nixpkgs/blob/689fed12a013f56d4c4d3f612489634267d86529/pkgs/development/libraries/java/lombok/default.nix#L21
|
||||||
|
home.packages = [ pkgs.lombok ];
|
||||||
|
|
||||||
|
# This one adds the lombok jar to the session variables so programs
|
||||||
|
# can find it if they cannot find it in the classpath.
|
||||||
|
home.sessionVariables = {
|
||||||
|
LOMBOK_JAR = lombokJar;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -74,6 +74,7 @@
|
||||||
home.programs = {
|
home.programs = {
|
||||||
zathura.enable = lib.mkEnableOption "zathura";
|
zathura.enable = lib.mkEnableOption "zathura";
|
||||||
floorp.enable = lib.mkEnableOption "floorp";
|
floorp.enable = lib.mkEnableOption "floorp";
|
||||||
|
java.enable = lib.mkEnableOption "java";
|
||||||
zellij = {
|
zellij = {
|
||||||
enable = lib.mkEnableOption "zellij";
|
enable = lib.mkEnableOption "zellij";
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,7 @@ in
|
||||||
elisa.enable = true;
|
elisa.enable = true;
|
||||||
obsidian.enable = true;
|
obsidian.enable = true;
|
||||||
jetbrains.idea.enable = true;
|
jetbrains.idea.enable = true;
|
||||||
|
java.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.mongodb-compass.enable = true;
|
programs.mongodb-compass.enable = true;
|
||||||
|
|
Loading…
Reference in a new issue