27 lines
513 B
Nix
27 lines
513 B
Nix
{ pkgs, config, inputs, lib, ... }:
|
|
let
|
|
rust = config.maid.rust;
|
|
in
|
|
{
|
|
options.maid.rust = {
|
|
enable = lib.mkEnableOption "rust toolchain";
|
|
};
|
|
|
|
config = lib.mkIf rust.enable {
|
|
nixpkgs.overlays = [ inputs.fenix.overlays.default ];
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
(fenix.complete.withComponents [
|
|
"rustc"
|
|
"cargo"
|
|
"rustfmt"
|
|
"rust-src"
|
|
"rust-analyzer"
|
|
"clippy"
|
|
"miri"
|
|
])
|
|
sccache
|
|
cargo-edit
|
|
];
|
|
};
|
|
}
|