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

Paths added to lower store are accessible via overlay.

This commit is contained in:
Ben Radford 2023-07-18 10:49:44 +01:00
parent f66b65a30a
commit a33ee5c843
No known key found for this signature in database
GPG key ID: 9DF5D4640AB888D5
5 changed files with 51 additions and 4 deletions

View file

@ -8,7 +8,7 @@ requireEnvironment () {
}
setupConfig () {
echo "drop-supplementary-groups = false" >> "$NIX_CONF_DIR"/nix.conf
echo "require-drop-supplementary-groups = false" >> "$NIX_CONF_DIR"/nix.conf
echo "build-users-group = " >> "$NIX_CONF_DIR"/nix.conf
}
@ -54,3 +54,12 @@ initLowerStore () {
execUnshare () {
exec unshare --mount --map-root-user "$@"
}
addTextToStore() {
storeDir=$1; shift
filename=$1; shift
content=$1; shift
filePath="$TEST_HOME/$filename"
echo "$content" > "$filePath"
nix-store --store "$storeDir" --add "$filePath"
}