Skip to content

Commit

Permalink
home (intellij): Introduce module
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
britter committed Jul 7, 2024
1 parent 2cd11df commit ae00e6f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
6 changes: 5 additions & 1 deletion home/desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ in {
../alacritty
../firefox
../gnome
../intellij
../vscode
];

Expand All @@ -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
];
Expand All @@ -29,6 +29,10 @@ in {
alacritty.enable = true;
firefox.enable = true;
gnome.enable = true;
intellij = {
enable = true;
plugins = ["asciidoc"];
};
vscode.enable = true;
};
};
Expand Down
22 changes: 22 additions & 0 deletions home/intellij/default.nix
Original file line number Diff line number Diff line change
@@ -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)
];
};
}

0 comments on commit ae00e6f

Please sign in to comment.