From f50800a9dffb18572ca28b8afd592b8a7c203607 Mon Sep 17 00:00:00 2001 From: Aspen Smith Date: Tue, 20 Feb 2024 13:14:51 -0500 Subject: fix(ops/nixos): Don't use the store path for depot Using an actual store path here means we have to copy all of depot into the Nix store just to rebuild NixOS for a system - this is especially painful if, like me, you have a rust target/ directory in depot which is hundreds of GB - nix-build just OOMed on my system with 128GB of RAM! There's no reason to use a store path here - we can just point to wherever depot happened to be cloned. Change-Id: Ibfd7181f0f75de077561db70ac8636389836980f Reviewed-on: https://cl.tvl.fyi/c/depot/+/10997 Reviewed-by: sterni Reviewed-by: tazjin Autosubmit: aspen Tested-by: BuildkiteCI --- ops/nixos.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ops/nixos.nix') diff --git a/ops/nixos.nix b/ops/nixos.nix index 147a016efc..1442d89b30 100644 --- a/ops/nixos.nix +++ b/ops/nixos.nix @@ -40,7 +40,10 @@ in rec { (throw "${hostname} is not a known NixOS host") (map nixosFor depot.ops.machines.all-systems)); - rebuild-system = rebuildSystemWith depot.path; + rebuild-system = rebuildSystemWith ( + # HACK: use the string of the original source to avoid copying the whole + # depot into the store just for this + builtins.toString depot.path.origSrc); rebuildSystemWith = depotPath: pkgs.writeShellScriptBin "rebuild-system" '' set -ue -- cgit 1.4.1