-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrust.nix
More file actions
31 lines (27 loc) · 778 Bytes
/
rust.nix
File metadata and controls
31 lines (27 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ pkgs, ... }:
{
home = {
packages = with pkgs; [ rustup ];
sessionPath = [ "$HOME/.cargo/bin" ];
};
programs = {
zsh.shellAliases = {
c = "cargo";
"c.c" = "cargo clippy --fix --allow-dirty --allow-staged";
"c.t" = "RUST_BACKTRACE=1 cargo test -- --nocapture";
"c.t.r" = "RUST_BACKTRACE=1 cargo test --release -- --nocapture";
};
vscode.profiles.default = {
userSettings = {
"[rust]"."editor.defaultFormatter" = "rust-lang.rust-analyzer";
"rust-analyzer.check.command" = "clippy";
"rust-analyzer.cargo.features" = "all";
};
extensions = with pkgs.vscode-extensions; [
rust-lang.rust-analyzer
serayuzgur.crates
tamasfe.even-better-toml
];
};
};
}