Skip to content

test build time with xcp #788

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion disko-install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/make-disk-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ let
util-linux
findutils
kmod
xcp
]
++ cfg.extraDependencies;
preVM = ''
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
binlore,
diskoVersion,
stdenv,
xcp,
}:

let
Expand Down Expand Up @@ -49,6 +50,7 @@ let
[
nix
coreutils
xcp
]
++ lib.optional (!stdenv.isDarwin) nixos-install-tools
)
Expand Down