raito-shared-public-infra/modules/android-cache.nix
2023-08-26 19:00:04 +02:00

15 lines
491 B
Nix

{ lib, ... }:
let
mirrors = {
"https://android.googlesource.com" = "/var/lib/src/aosp/mirror";
"https://github.com/LineageOS" = "/var/lib/src/lineageos/LineageOS";
"https://github.com/TheMuppets" = "/var/lib/src/themuppets/TheMuppets";
};
in
{
nix.envVars.ROBOTNIX_GIT_MIRRORS = lib.concatStringsSep "|" (lib.mapAttrsToList (local: remote: "${local}=${remote}") mirrors);
# Also add local mirrors to nix sandbox exceptions
nix.sandboxPaths = lib.attrValues mirrors;
}