Files
moshy-rust/devenv.nix
2025-10-31 11:45:24 -04:00

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;
};
}