diff --git a/disko-install b/disko-install index 80715bcb..5a07ee12 100755 --- a/disko-install +++ b/disko-install @@ -256,7 +256,7 @@ main() { if [[ ! -f "${mountPoint}/nix/var/nix/db/db.sqlite" ]]; then echo "Copying store paths" >&2 mkdir -p "${mountPoint}/nix/store" - xargs cp --recursive --target "${mountPoint}/nix/store" < "${closure_info}/store-paths" + xargs xcp --recursive --target-directory "${mountPoint}/nix/store" < "${closure_info}/store-paths" echo "Loading nix database" >&2 NIX_STATE_DIR=${mountPoint}/nix/var/nix nix-store --load-db < "${closure_info}/registration" fi diff --git a/lib/make-disk-image.nix b/lib/make-disk-image.nix index ef527457..8be3f5f6 100644 --- a/lib/make-disk-image.nix +++ b/lib/make-disk-image.nix @@ -92,6 +92,7 @@ let util-linux findutils kmod + xcp ] ++ cfg.extraDependencies; preVM = '' @@ -143,7 +144,7 @@ let # We copy files with cp because `nix copy` seems to have a large memory leak mkdir -p ${systemToInstall.config.disko.rootMountPoint}/nix/store - time xargs cp --recursive --target ${systemToInstall.config.disko.rootMountPoint}/nix/store < ${closureInfo}/store-paths + xargs xcp --recursive --target-directory ${systemToInstall.config.disko.rootMountPoint}/nix/store < ${closureInfo}/store-paths ${systemToInstall.config.system.build.nixos-install}/bin/nixos-install --root ${systemToInstall.config.disko.rootMountPoint} --system ${systemToInstall.config.system.build.toplevel} --keep-going --no-channel-copy -v --no-root-password --option binary-caches "" umount -Rv ${lib.escapeShellArg systemToInstall.config.disko.rootMountPoint} diff --git a/package.nix b/package.nix index ebfb15aa..039d1538 100644 --- a/package.nix +++ b/package.nix @@ -9,6 +9,7 @@ binlore, diskoVersion, stdenv, + xcp, }: let @@ -49,6 +50,7 @@ let [ nix coreutils + xcp ] ++ lib.optional (!stdenv.isDarwin) nixos-install-tools )