17 lines
481 B
Nix
17 lines
481 B
Nix
# SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
{ lib, pkgs, ... }:
|
|
|
|
{
|
|
home.file.".cargo/config.toml".source = (pkgs.formats.toml { }).generate "cargo-config.toml" {
|
|
registry = {
|
|
global-credential-providers = lib.singleton "cargo:token-from-stdout ${pkgs.writeShellScript "" ''
|
|
set -eu
|
|
pass cargo/registry-token/"$(base64 -w0 <<< "''${CARGO_REGISTRY_INDEX_URL}")"
|
|
''}";
|
|
};
|
|
};
|
|
}
|