Skip to content

Commit

Permalink
feat(ide): extended fork profile for IDE by JVM, CPP and Rust profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Wittano committed Jul 20, 2024
1 parent 06e8c29 commit 7d62525
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 21 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion hosts/pc/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
games.enable = true;
mihoyo.enable = true;
};
dev.lang.ides = [ "go" "sql" "haskell" "fork" ];
dev.lang.ides = [ "go" "sql" "haskell" "fork" "jvm" ];
hardware = rec {
grub.enableMultiBoot = true;
sound.enable = true;
Expand Down
54 changes: 37 additions & 17 deletions modules/dev/ide.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,43 @@ let
homeDir = config.home-manager.users.wittano.home.homeDirectory;
addProjectDirField = attr: builtins.mapAttrs (n: v: v // { projectDir = "${homeDir}/projects/own/${n}"; }) attr;

avaiableIde = addProjectDirField (with unstable.jetbrains; {
python.package = pycharm-professional;
cpp.package = clion;
go.package = goland;
dotnet.package = rider;
rust.package = rust-rover;
jvm.package = idea-ultimate;
sql.package = datagrip;
web.package = webstorm;
andorid.package = unstable.andorid-studio;
haskell.extraConfig = {
home-manager.users.wittano.home.packages = with unstable; [ zed-editor ];
};
fork.extraConfig = {
home-manager.users.wittano.home.packages = with unstable; [ vscodium ];
};
});
avaiableIde =
let
mkExtraConfig = ide: mkMerge [
{
home-manager.users.wittano.home.packages = with unstable; [ vscodium ];
}
(ide.extraConfig or { })
];
in
addProjectDirField (with unstable.jetbrains; rec {
python.package = pycharm-professional;
cpp.package = clion;
go.package = goland;
dotnet.package = rider;
rust.package = rust-rover;
jvm.package = idea-ultimate;
sql.package = datagrip;
web.package = webstorm;
andorid.package = unstable.andorid-studio;
haskell.extraConfig = {
home-manager.users.wittano.home.packages = with unstable; [ zed-editor ];
};
fork.extraConfig =
let
jvmConfig = mkExtraConfig jvm;
cppConfig = mkExtraConfig cpp;
rustConfig = mkExtraConfig rust;
in
mkMerge [
jvmConfig
cppConfig
rustConfig
{
home-manager.users.wittano.home.packages = with unstable; [ vscodium ];
}
];
});

installedIDEs = trivial.pipe cfg.ides [
(builtins.map (x: avaiableIde."${x}".package or null))
Expand Down

0 comments on commit 7d62525

Please sign in to comment.