From 6228f5a2df4b48fa73e297f0d316b1d4299d69b1 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Wed, 23 Aug 2023 13:00:22 +0200 Subject: [PATCH] epyc: add android cache --- hosts/epyc.nix | 1 + modules/android-cache.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 modules/android-cache.nix diff --git a/hosts/epyc.nix b/hosts/epyc.nix index 4d9dbbf..bf71054 100644 --- a/hosts/epyc.nix +++ b/hosts/epyc.nix @@ -10,6 +10,7 @@ in ../modules/iperf-server.nix ../modules/hypervisor.nix ../modules/hydra/coordinator.nix + ../modules/android-cache.nix ../modules/users/friends.nix ]; diff --git a/modules/android-cache.nix b/modules/android-cache.nix new file mode 100644 index 0000000..3fa3110 --- /dev/null +++ b/modules/android-cache.nix @@ -0,0 +1,13 @@ +{ lib, ... }: +let + mirrors = { + "https://android.googlesource.com" = "/var/lib/src/aosp/mirror"; + "https://github.com/LineageOS" = "/var/lib/src/lineageos/LineageOS"; + }; +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; +}