13 lines
305 B
Bash
13 lines
305 B
Bash
#!/bin/sh
|
|
|
|
# Checks if /nix/store is empty
|
|
if [ -z "$(ls -A /nix/store)" ]; then
|
|
echo "Nix store volume is empty. Copying pre-filled store from image."
|
|
cp -a /nix-store-backup/. /nix/store/
|
|
else
|
|
echo "Nix store volume is not empty. Skipping copy."
|
|
fi
|
|
|
|
# Start the normal container process
|
|
exec "$@"
|