Skip to content

Commit

Permalink
home (idea): Add idea start script
Browse files Browse the repository at this point in the history
This script will start IntelliJ from the command line
without blocking the terminal.
  • Loading branch information
britter committed Jan 27, 2025
1 parent 1043790 commit 61c4649
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions home/desktop/intellij/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,26 @@ in {
};
};

config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
(jetbrains.plugins.addPlugins jetbrains.idea-community-bin cfg.plugins)
];
programs.git.ignores = [
## IntelliJ stuff
".idea"
"*.iml"
"out/"
];
};
config = let
idea = pkgs.jetbrains.plugins.addPlugins pkgs.jetbrains.idea-community-bin cfg.plugins;
ideaStartScript = pkgs.writeShellApplication {
name = "idea";
text = ''
DIR=''${1:-$(pwd)}
nohup ${lib.getExe idea} "$DIR" > /dev/null 2>&1 &
'';
};
in
lib.mkIf cfg.enable {
home.packages = [
idea
ideaStartScript
];
programs.git.ignores = [
## IntelliJ stuff
".idea"
"*.iml"
"out/"
];
};
}

0 comments on commit 61c4649

Please sign in to comment.