flake/programs/rust.nix
2024-12-25 18:21:24 +01:00

22 lines
416 B
Nix

{
lib,
pkgs,
config,
...
}:
let
toml = pkgs.formats.toml { };
in
{
hm.home.file.".cargo/config.toml".source = toml.generate "config.toml" {
build.target-dir = "${config.hm.home.homeDirectory}/.cargo/target";
target.x86_64-unknown-linux-gnu = {
linker = "${lib.getExe pkgs.clang}";
rustflags = [
"-C"
"link-arg=-fuse-ld=${lib.getExe pkgs.mold}"
];
};
};
}