home-manager/modules/programs/eclipse.nix

55 lines
1.2 KiB
Nix
Raw Normal View History

2017-01-07 18:16:26 +00:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.eclipse;
in
{
meta.maintainers = [ maintainers.rycee ];
2017-01-07 18:16:26 +00:00
options = {
programs.eclipse = {
enable = mkEnableOption "Eclipse";
2018-01-09 21:03:13 +00:00
enableLombok = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
Whether to enable the Lombok Java Agent in Eclipse. This is
necessary to use the Lombok class annotations.
'';
};
2017-01-07 18:16:26 +00:00
jvmArgs = mkOption {
type = types.listOf types.str;
default = [];
description = "JVM arguments to use for the Eclipse process.";
};
plugins = mkOption {
type = types.listOf types.package;
default = [];
description = "Plugins that should be added to Eclipse.";
};
};
};
config = mkIf cfg.enable {
home.packages = [
(pkgs.eclipses.eclipseWithPlugins {
eclipse = pkgs.eclipses.eclipse-platform;
2018-01-09 21:03:13 +00:00
jvmArgs =
cfg.jvmArgs
++ optional cfg.enableLombok
"-javaagent:${pkgs.lombok}/share/java/lombok.jar";
2017-01-07 18:16:26 +00:00
plugins = cfg.plugins;
})
];
};
}