mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
drop dependency on xcp
It's actually not faster in combination with xargs...
This commit is contained in:
parent
babc1554e8
commit
718565dfbb
2 changed files with 3 additions and 8 deletions
|
@ -235,12 +235,8 @@ main() {
|
||||||
if [[ ! -d "${mountPoint}/nix/store" ]]; then
|
if [[ ! -d "${mountPoint}/nix/store" ]]; then
|
||||||
export NIX_STATE_DIR=${mountPoint}/nix/var/nix
|
export NIX_STATE_DIR=${mountPoint}/nix/var/nix
|
||||||
echo "Copying store paths" >&2
|
echo "Copying store paths" >&2
|
||||||
|
mkdir -p "${mountPoint}/nix/store"
|
||||||
if [ -t 1 ]; then
|
xargs cp --recursive --target "${mountPoint}/nix/store" < "${closure_info}/store-paths"
|
||||||
xargs -I% xcp --recursive % "${mountPoint}/nix/store" < "${closure_info}/store-paths"
|
|
||||||
else
|
|
||||||
xargs -I% xcp --recursive --no-progress % "${mountPoint}/nix/store" < "${closure_info}/store-paths"
|
|
||||||
fi
|
|
||||||
echo "Loading nix database" >&2
|
echo "Loading nix database" >&2
|
||||||
nix-store --load-db < "${closure_info}/registration"
|
nix-store --load-db < "${closure_info}/registration"
|
||||||
unset NIX_STATE_DIR
|
unset NIX_STATE_DIR
|
||||||
|
|
|
@ -28,7 +28,6 @@ let
|
||||||
systemdMinimal
|
systemdMinimal
|
||||||
nix
|
nix
|
||||||
util-linux
|
util-linux
|
||||||
xcp
|
|
||||||
] ++ nixosConfig.config.disko.extraDependencies;
|
] ++ nixosConfig.config.disko.extraDependencies;
|
||||||
preVM = ''
|
preVM = ''
|
||||||
${lib.concatMapStringsSep "\n" (disk: "truncate -s ${disk.imageSize} ${disk.name}.raw") (lib.attrValues nixosConfig.config.disko.devices.disk)}
|
${lib.concatMapStringsSep "\n" (disk: "truncate -s ${disk.imageSize} ${disk.name}.raw") (lib.attrValues nixosConfig.config.disko.devices.disk)}
|
||||||
|
@ -68,7 +67,7 @@ let
|
||||||
|
|
||||||
# We copy files with cp because `nix copy` seems to have a large memory leak
|
# We copy files with cp because `nix copy` seems to have a large memory leak
|
||||||
mkdir -p ${systemToInstall.config.disko.rootMountPoint}/nix/store
|
mkdir -p ${systemToInstall.config.disko.rootMountPoint}/nix/store
|
||||||
xargs -I % xcp --recursive % ${systemToInstall.config.disko.rootMountPoint}/nix/store < ${closureInfo}/store-paths
|
xargs cp --recursive --target ${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 ""
|
${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 ${systemToInstall.config.disko.rootMountPoint}
|
umount -Rv ${systemToInstall.config.disko.rootMountPoint}
|
||||||
|
|
Loading…
Reference in a new issue