From ae00e6f517b2202a1dbbf431caf8c6e80e3283e7 Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Sun, 7 Jul 2024 11:30:33 +0200 Subject: [PATCH] home (intellij): Introduce module The module provides a configuration option for more easily defining desired plugins. See https://github.com/NixOS/nixpkgs/blob/592c8f0596a49ea386d1355d930b70f53b6bda9f/pkgs/applications/editors/jetbrains/readme.md for more details. --- home/desktop/default.nix | 6 +++++- home/intellij/default.nix | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 home/intellij/default.nix diff --git a/home/desktop/default.nix b/home/desktop/default.nix index bd25318..9142f4b 100644 --- a/home/desktop/default.nix +++ b/home/desktop/default.nix @@ -10,6 +10,7 @@ in { ../alacritty ../firefox ../gnome + ../intellij ../vscode ]; @@ -20,7 +21,6 @@ in { config = lib.mkIf cfg.enable { # software not available as Home Manager module home.packages = with pkgs; [ - jetbrains.idea-community fractal-next logseq ]; @@ -29,6 +29,10 @@ in { alacritty.enable = true; firefox.enable = true; gnome.enable = true; + intellij = { + enable = true; + plugins = ["asciidoc"]; + }; vscode.enable = true; }; }; diff --git a/home/intellij/default.nix b/home/intellij/default.nix new file mode 100644 index 0000000..c322184 --- /dev/null +++ b/home/intellij/default.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.my.home.desktop.intellij; +in { + options.my.home.desktop.intellij = { + enable = lib.mkEnableOption "intellij"; + plugins = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = []; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + (jetbrains.plugins.addPlugins jetbrains.idea-community cfg.plugins) + ]; + }; +}