From 4215148d583a7d2a598470cd4fc18742ab99af89 Mon Sep 17 00:00:00 2001 From: jasmine Date: Fri, 7 Mar 2025 00:22:59 +0800 Subject: [PATCH] feat: manage jetbrains plugins with nix-jetbrains-plugins --- .../sajenim/features/editors/default.nix | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/home-manager/sajenim/features/editors/default.nix b/home-manager/sajenim/features/editors/default.nix index e8780af..a35e2d1 100644 --- a/home-manager/sajenim/features/editors/default.nix +++ b/home-manager/sajenim/features/editors/default.nix @@ -1,7 +1,8 @@ -{pkgs, ...}: let - # Define a function to add GitHub Copilot plugin to Jetbrains IDEs - addGithubCopilot = ide: pkgs.jetbrains.plugins.addPlugins ide ["github-copilot"]; -in { +{ + pkgs, + inputs, + ... +}: { # Enable Visual Studio Code (VSCode) program programs.vscode = { enable = true; @@ -11,14 +12,27 @@ in { }; # List of packages to be installed - home.packages = [ - # Toolchain - pkgs.gcc # GCC compiler - pkgs.python39 # Python 3.9 interpreter - - # Add GitHub Copilot plugin to Jetbrains IDEs - (addGithubCopilot pkgs.jetbrains.clion) - (addGithubCopilot pkgs.jetbrains.idea-ultimate) - (addGithubCopilot pkgs.jetbrains.pycharm-professional) - ]; + home.packages = with pkgs; + [ + # Toolchain + gcc + jdk + unstable.python313 # Note: keep this in sync with school. + ] + # Install jetbrains IDEs with plugins + ++ (with inputs.nix-jetbrains-plugins.lib."${system}"; [ + (buildIdeWithPlugins pkgs.jetbrains "clion" [ + "com.github.copilot" + "gruvbox-material-dark" + ]) + (buildIdeWithPlugins pkgs.jetbrains "idea-ultimate" [ + "com.github.copilot" + "gruvbox-material-dark" + ]) + (buildIdeWithPlugins pkgs.jetbrains "pycharm-professional" [ + "com.github.copilot" + "gruvbox-material-dark" + ]) + ]); + # https://github.com/theCapypara/nix-jetbrains-plugins }