Rust: cargo-release config

This commit is contained in:
Filippo Berto 2023-11-20 14:32:37 +01:00
parent 19e12e6605
commit 49273031e4
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056

View file

@ -1,8 +1,6 @@
{ pkgs, lib, config, ... }: {
home.file.".cargo/config".text = ''
[build]
rustc-wrapper = "${pkgs.sccache}/bin/sccache"
'';
{ pkgs, lib, config, ... }:
let tomlGenerate = (pkgs.formats.toml { }).generate; in
{
home.packages = (builtins.attrValues {
inherit (pkgs)
bacon cargo cargo-audit cargo-criterion cargo-deadlinks cargo-expand
@ -18,4 +16,14 @@
})
++ lib.optionals config.programs.helix.enable (builtins.attrValues { inherit (pkgs) lldb rust-analyzer; })
++ lib.optionals config.programs.kakoune.enable (builtins.attrValues { inherit (pkgs) rust-analyzer; });
home.file.".cargo/config".source = tomlGenerate "cargo-config" {
build.rustc-wrapper = "${pkgs.sccache}/bin/sccache";
};
xdg.configFile."cargo-release/release.toml".source = tomlGenerate "release.toml" {
sign-commit = true;
sign-tag = true;
publish = false;
};
}