From d765dd1f60664a4af96cb7bd24c8d89bfab85220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Sat, 7 May 2022 11:16:20 +0200 Subject: [PATCH] ci: use nix copy instead of nix-copy-closure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also use `ssh-ng://` protocol implementation instead of `ssh://`. Might fix the following error: ``` error (ignored): error: reached end of FramedSource error: sized: unexpected end-of-file error: unexpected end-of-file ``` For more details see: https://github.com/NixOS/nix/issues/6495 Signed-off-by: Jakub SokoĊ‚owski --- ci/Jenkinsfile.nix-cache | 4 ++-- nix/nix.conf | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/Jenkinsfile.nix-cache b/ci/Jenkinsfile.nix-cache index c3b10b9861..9811eb30d6 100644 --- a/ci/Jenkinsfile.nix-cache +++ b/ci/Jenkinsfile.nix-cache @@ -98,8 +98,8 @@ pipeline { nix.shell(""" find /nix/store/ -mindepth 1 -maxdepth 1 -type d \ -not -name '*.links' -and -not -name '*-status-react-*' \ - | xargs nix-copy-closure -v \ - --to ${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST} + | xargs nix copy \ + --to ssh-ng://${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST} """, pure: false ) diff --git a/nix/nix.conf b/nix/nix.conf index 19488b3659..d9bbe8a985 100644 --- a/nix/nix.conf +++ b/nix/nix.conf @@ -11,3 +11,5 @@ keep-derivations = true keep-outputs = true # Extra isolation for network and filesystem, doesn't work on MacOS build-use-sandbox = false +# Enable Nix v2 interface. +experimental-features = nix-command