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 <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: aspen <root@gws.fyi> Tested-by: BuildkiteCI
This commit is contained in:
parent
5ced8e7292
commit
f50800a9df
1 changed files with 4 additions and 1 deletions
|
@ -40,7 +40,10 @@ in rec {
|
||||||
(throw "${hostname} is not a known NixOS host")
|
(throw "${hostname} is not a known NixOS host")
|
||||||
(map nixosFor depot.ops.machines.all-systems));
|
(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" ''
|
rebuildSystemWith = depotPath: pkgs.writeShellScriptBin "rebuild-system" ''
|
||||||
set -ue
|
set -ue
|
||||||
|
|
Loading…
Reference in a new issue