45 lines
619 B
Nix
45 lines
619 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
inputs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
# Basic packages
|
|
packages = with pkgs; [
|
|
git
|
|
cargo-watch
|
|
cargo-edit
|
|
lldb
|
|
];
|
|
|
|
cachix.enable = true;
|
|
|
|
# Rust language support
|
|
languages.rust = {
|
|
enable = true;
|
|
# Choose your channel
|
|
channel = "stable"; # or "nightly", "beta"
|
|
|
|
# Optional: specify components
|
|
components = [
|
|
"rustc"
|
|
"cargo"
|
|
"clippy"
|
|
"rustfmt"
|
|
"rust-analyzer"
|
|
];
|
|
};
|
|
|
|
# Environment variables
|
|
env.RUST_BACKTRACE = "1";
|
|
|
|
# Pre-commit hooks
|
|
git-hooks.hooks = {
|
|
rustfmt.enable = true;
|
|
clippy.enable = true;
|
|
};
|
|
}
|