From 190606746c156d5f6a0a3714b36732f46ae5148b Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 4 Oct 2020 02:56:34 +0100 Subject: [PATCH] ops/nixos/lib/common: add the binary cache credentials to nix.envVars --- ops/nixos/lib/common.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ops/nixos/lib/common.nix b/ops/nixos/lib/common.nix index 9369172ecb..ae02d99e67 100644 --- a/ops/nixos/lib/common.nix +++ b/ops/nixos/lib/common.nix @@ -12,8 +12,12 @@ in nix = { nixPath = [ "depot=/home/lukegb/depot/" "nixpkgs=/home/lukegb/depot/third_party/nixpkgs/" ]; trustedUsers = [ "root" "@wheel" ]; - binaryCaches = lib.mkForce [ "https://cache.nixos.org/" ]; + binaryCaches = lib.mkForce [ "https://cache.nixos.org/" "s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1" ]; trustedBinaryCaches = lib.mkForce [ "https://cache.nixos.org/" "s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1" ]; + envVars = { + AWS_ACCESS_KEY_ID = "${depot.ops.secrets.nixCache.AWS_ACCESS_KEY_ID}"; + AWS_SECRET_ACCESS_KEY = "${depot.ops.secrets.nixCache.AWS_SECRET_ACCESS_KEY}"; + }; }; nixpkgs.config = depot.third_party.nixpkgsConfig;