Skip to content

Commit

Permalink
feat(dev): added rust IDE module
Browse files Browse the repository at this point in the history
  • Loading branch information
Wittano committed Jan 28, 2024
1 parent 54f3825 commit 25e2aee
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 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.

11 changes: 1 addition & 10 deletions modules/dev/cpp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ with lib;
with lib.my;
let
cfg = config.modules.dev.clion;
pRustCommand = commands.createProjectJumpCommand config "$HOME/projects/own/rust";
pCppCommand = commands.createProjectJumpCommand config "$HOME/projects/own/cpp";
in
{
Expand All @@ -16,17 +15,9 @@ in
};

config = mkIf cfg.enable (mkMerge [
pRustCommand
pCppCommand
{
home-manager.users.wittano = {
home.packages = (with pkgs; [
# Rust
rustup # TODO Split rust and cpp configuration

jetbrains.clion
]);
};
home-manager.users.wittano.home.packages = (with pkgs; [ jetbrains.clion ]);
}
]);
}
23 changes: 23 additions & 0 deletions modules/dev/rust.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ pkgs, lib, config, home-manager, ... }:
with lib;
with lib.my;
with builtins;
let
cfg = config.modules.dev.rust;
pRustCommand = commands.createProjectJumpCommand config "$HOME/projects/own/rust";
in
{
options = {
modules.dev.rust = {
enable = mkEnableOption "Enable rust IDE";
};
};

config = mkIf (cfg.enable) (mkMerge [
pRustCommand
{
home-manager.users.wittano.home.packages = with pkgs; [ jetbrains.rust-rover ];
}
]);
}

0 comments on commit 25e2aee

Please sign in to comment.