aboutsummaryrefslogtreecommitdiffstats
path: root/home/cargo
diff options
context:
space:
mode:
authorPetri Hienonen <petri.hienonen@gmail.com>2025-12-03 09:25:03 +0200
committerPetri Hienonen <petri.hienonen@gmail.com>2025-12-03 09:25:03 +0200
commite80de5ae7c0f96638820ee0b60a3776321fa19f1 (patch)
tree7d69a65879f801fac6e189188e309a19022f34a1 /home/cargo
parent3888d2a09ea45a81832010f092ceb0ab814f02cd (diff)
downloadnixos-e80de5ae7c0f96638820ee0b60a3776321fa19f1.tar.zst
Update .cargo/config.toml to nix for validation
Diffstat (limited to 'home/cargo')
-rw-r--r--home/cargo/default.nix63
1 files changed, 35 insertions, 28 deletions
diff --git a/home/cargo/default.nix b/home/cargo/default.nix
index b63fcc8..b01ff1a 100644
--- a/home/cargo/default.nix
+++ b/home/cargo/default.nix
@@ -1,30 +1,37 @@
-{ inputs, pkgs, ... }:
+{ pkgs, ... }:
{
- xdg.configFile."/home/petri/.cargo/config.toml".text = ''
- [registry]
- global-credential-providers = ["cargo:token"]
-
- [registries.crates-io]
- protocol = "sparse" # The protocol to use to access crates.io.
-
- [registries.relesoft]
- index = "sparse+https://git.relesoft.io/api/packages/relesoft/cargo/"
-
- [unstable]
- gc = true
-
- [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
- progress.width = 80 # width of progress bar
- progress.term-integration = true # whether cargo reports progress to terminal emulator
- '';
+ 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;
+ };
+ "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
+ };
+ };
+ };
}