diff --git a/packages.nix b/packages.nix index 6a65d6b8..f330b8e2 100644 --- a/packages.nix +++ b/packages.nix @@ -188,15 +188,18 @@ lib.attrsets.mapAttrs rm -f old [ -e current ] && cp --no-dereference current old ''; - createSymlinks = name: '' + createSymlinks = name: let + gcrootDir = "/nix/var/nix/gcroots/microvm"; + in /* bash */ '' if [[ -e old ]]; then echo System package diff: nix --extra-experimental-features nix-command store diff-closures ./old ./current || true fi - ln -sfT \$PWD/current /nix/var/nix/gcroots/microvm/${name} - ln -sfT \$PWD/booted /nix/var/nix/gcroots/microvm/booted-${name} - ln -sfT \$PWD/old /nix/var/nix/gcroots/microvm/old-${name} + mkdir -p ${gcrootDir} + ln -sfT \$PWD/current ${gcrootDir}/${name} + ln -sfT \$PWD/booted ${gcrootDir}/booted-${name} + ln -sfT \$PWD/old ${gcrootDir}/old-${name} ''; in {