ops/nixos/lib: don't use the s3 binary cache except when rebuilder-ing.
This commit is contained in:
parent
abbbc2c216
commit
d9cc0c9de1
2 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ in
|
|||
nix = {
|
||||
nixPath = [ "depot=/home/lukegb/depot/" "nixpkgs=/home/lukegb/depot/third_party/nixpkgs/" ];
|
||||
trustedUsers = [ "root" "@wheel" ];
|
||||
binaryCaches = lib.mkForce [ "https://cache.nixos.org/" "s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1" ];
|
||||
binaryCaches = lib.mkForce [ "https://cache.nixos.org/" ];
|
||||
trustedBinaryCaches = lib.mkForce [ "https://cache.nixos.org/" "s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1" ];
|
||||
};
|
||||
nixpkgs.config = { allowUnfree = true; };
|
||||
|
|
|
@ -10,7 +10,7 @@ pkgs.writeShellScriptBin "rebuilder" ''
|
|||
export AWS_ACCESS_KEY_ID="${depot.ops.secrets.nixCache.AWS_ACCESS_KEY_ID}"
|
||||
export AWS_SECRET_ACCESS_KEY="${depot.ops.secrets.nixCache.AWS_SECRET_ACCESS_KEY}"
|
||||
|
||||
system="$(nix-build -E "(import $DEPOT_PATH {}).ops.nixos.${system}" --no-out-link)"
|
||||
system="$(nix-build --option substituters "https://cache.nixos.org s3://lukegb-nix-cache?endpoint=storage.googleapis.com&trusted=1" -E "(import $DEPOT_PATH {}).ops.nixos.${system}" --no-out-link)"
|
||||
nix-env -p /nix/var/nix/profiles/system --set "$system"
|
||||
"$system/bin/switch-to-configuration" switch
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue