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:
parent
26c3fc11ea
commit
76f75e7691
9 changed files with 53 additions and 27 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue