From 2475d151d64be16562fdfa14cde4f57e658fbdc1 Mon Sep 17 00:00:00 2001 From: buffet Date: Tue, 18 Oct 2022 21:16:25 +0000 Subject: [PATCH] feat(cargo): use mold --- programs/cargo.nix | 9 +++++++++ programs/default.nix | 1 + 2 files changed, 10 insertions(+) create mode 100644 programs/cargo.nix diff --git a/programs/cargo.nix b/programs/cargo.nix new file mode 100644 index 0000000..0ee344d --- /dev/null +++ b/programs/cargo.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + home-manager.users.buffet = { + home.file.".cargo/config.toml".text = '' + [target.x86_64-unknown-linux-gnu] + linker = "${pkgs.clang}/bin/clang" + rustflags = ["-C", "link-arg=-fuse-ld=${pkgs.mold}/bin/mold"] + ''; + }; +} diff --git a/programs/default.nix b/programs/default.nix index 95954aa..d22d778 100644 --- a/programs/default.nix +++ b/programs/default.nix @@ -3,6 +3,7 @@ _: { ./alacritty.nix ./bash.nix ./borg.nix + ./cargo.nix ./chromium.nix ./git.nix ./gpg.nix