diff options
Diffstat (limited to 'home/cargo.nix')
| -rw-r--r-- | home/cargo.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/home/cargo.nix b/home/cargo.nix new file mode 100644 index 0000000..d05fbe8 --- /dev/null +++ b/home/cargo.nix @@ -0,0 +1,46 @@ +{ pkgs, ... }: +{ + xdg.configFile."/home/petri/.cargo/config.toml".source = + (pkgs.formats.toml { }).generate "cargo-config" + { + registry = { + "global-credential-providers" = [ "cargo:token" ]; + }; + registries = { + "crates-io" = { + protocol = "sparse"; # The protocol to use to access crates.io. + }; + relesoft = { + index = "sparse+https://git.relesoft.io/api/packages/relesoft/cargo/"; + }; + }; + unstable = { + gc = true; + }; + target = { + x86_64-unknown-linux-gnu = { + linker = "${pkgs.clang}/bin/clang"; + rustflags = [ + "-C" + "link-arg=--ld-path=${pkgs.mold}/bin/mold" + ]; + }; + }; + "future-incompat-report" = { + frequency = "always"; # when to display a notification about a future incompat report + }; + cache = { + "auto-clean-frequency" = "1 day"; # How often to perform automatic cache cleaning + }; + term = { + color = "auto"; + hyperlinks = true; # whether cargo inserts links into output + unicode = true; # whether cargo can render output using non-ASCII unicode characters + progress = { + when = "auto"; # whether cargo shows progress bar + width = 80; # width of progress bar + "term-integration" = true; # whether cargo reports progress to terminal emulator + }; + }; + }; +} |
