From a387054cfe8b55b5275b714de56bd44b275c0134 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Sat, 26 Aug 2023 21:24:52 +0800 Subject: [PATCH] feat(rust): use toml generator --- programs/rust.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/rust.nix b/programs/rust.nix index 19525ee..3152b8c 100644 --- a/programs/rust.nix +++ b/programs/rust.nix @@ -1,8 +1,8 @@ {pkgs, ...}: let inherit (pkgs) lib; + toml = pkgs.formats.toml {}; in { - home.file.".cargo/config.toml".text = '' - [build] - rustc-wrapper = "${lib.getExe' pkgs.sccache "sccache"}" - ''; + home.file.".cargo/config.toml".source = toml.generate "config.toml" { + build.rustc-wrapper = lib.getExe' pkgs.sccache "sccache"; + }; }