1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 02:43:54 +02:00

nix copy: Add --profile flag

This allows `nix copy` to atomically copy a store path and point a
profile to it, without the risk that the store path might be GC'ed in
between. This is useful for instance when deploying a new NixOS system
profile from a remote store.
This commit is contained in:
Eelco Dolstra 2024-10-08 15:28:49 +02:00
parent 26c3fc11ea
commit 76f75e7691
9 changed files with 53 additions and 27 deletions

View file

@ -18,7 +18,9 @@ HASH=$(nix hash path $outPath)
clearStore
clearCacheCache
nix copy --from $cacheURI $outPath --no-check-sigs
nix copy --from $cacheURI $outPath --no-check-sigs --profile $TEST_ROOT/profile
[[ -e $TEST_ROOT/profile ]]
if ls $cacheDir/nar/*.zst &> /dev/null; then
echo "files do exist"