Files
config/profiles/base/binary-caches.nix

43 lines
1.7 KiB
Nix

#!/usr/bin/env -S nix eval --json --file
let
caches = {
# lower ?priority=x numbers go first, will fallback to https://.../nix-cache-info if unset, final fallback is the default 0
# https://nix.dev/manual/nix/latest/command-ref/conf-file#conf-substituters
# https://nix.dev/manual/nix/latest/command-ref/conf-file#conf-trusted-public-keys
# https://cache.nixos.org/nix-cache-info (WantMassQuery: 1, priority: 40)
"https://cache.nixos.org/" = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
];
# https://nix-community.cachix.org/nix-cache-info (WantMassQuery: 1, priority: 41)
"https://nix-community.cachix.org/" = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
# # dead? https://github.com/numtide/nixpkgs-unfree/commit/399ae17bda97a0318a0c5316edb169d097a776dc
# # https://numtide.cachix.org/nix-cache-info (WantMassQuery: 1, priority: 41)
# "https://numtide.cachix.org/" = [
# "numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
# ];
# https://flox.dev/blog/flox-the-nix-foundation-and-nvidia-partner-for-cuda/
# https://cache.flox.dev/nix-cache-info (no WantMassQuery, no priority(!!!))
"https://cache.flox.dev/?priority=45" = [
"flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
];
# me!
# "https://cache-proxy.pbsds.net/?priority=35" = [ ];
};
in
{
nix.settings = {
# nixos will add the public binary cache as well with a mkAfter, unless we mkForce these
substituters = builtins.attrNames caches;
trusted-substituters = builtins.attrNames caches;
trusted-public-keys = builtins.concatLists (builtins.attrValues caches);
};
}