This commit is contained in:
Aleksandr 2024-10-06 20:54:07 +03:00
parent 689f5dea6d
commit 7dd47b6238
16 changed files with 284 additions and 38 deletions

27
m/rust.nix Normal file
View file

@ -0,0 +1,27 @@
{ 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
];
};
}