shared-public-infra/modules/android-cache.nix

14 lines
405 B
Nix
Raw Normal View History

2023-08-23 11:00:22 +00:00
{ lib, ... }:
let
mirrors = {
"https://android.googlesource.com" = "/var/lib/src/aosp/mirror";
2023-08-24 17:46:52 +00:00
"https://github.com/LineageOS" = "/var/lib/src/lineageos";
2023-08-23 11:00:22 +00:00
};
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;
}