grimm-nixos-laptop/common/tooling/rust.nix
2024-05-15 23:24:35 +02:00

30 lines
549 B
Nix

{
pkgs,
lib,
config,
...
}:
let
inherit (config.grimmShared) enable tooling graphical;
in
{
config = lib.mkIf (enable && tooling.enable) {
environment.systemPackages =
with pkgs;
[ pkg-config ] ++ lib.optionals graphical [ jetbrains.clion ];
grimmShared.tooling.lang_servers = [
{
lsp = {
package = pkgs.rust-analyzer;
lspconf_mod_name = "rust_analyzer";
};
fmt = {
package = pkgs.rustfmt;
includes = [ "*.rs" ];
};
}
];
};
}