| while read i; do
printf '%s--ro-bind\0'$i'\0'$i'\0' ''
done
+ if [ -e "/run/current-system/pub/$user" ]; then
+ nix-store -q -R "/run/current-system/pub/$user" \
+ | while read i; do
+ printf '%s--ro-bind\0'$i'\0'$i'\0' ''
+ done
+ printf '%s--ro-bind\0/run/current-system/pub/'$user'/bin\0/bin-pub-'$user'\0' ''
+ fi
}
set -euo pipefail
--setenv LOCALE_ARCHIVE "/etc/locale-archive" \
--setenv XDG_RUNTIME_DIR "/run/user/`id -u`" \
--setenv PS1 "$user@pub $ " \
- --setenv PATH "/bin:/bin-pub" \
+ --setenv PATH "/bin-pub-$user:/bin:/bin-pub" \
--setenv HOME "/var/lib/pub" \
--file 11 /etc/passwd \
--file 12 /etc/group \
-- $orig) \
- 10< <(nix_store_paths) \
+ 10< <(nix_store_paths | sort | uniq) \
11< <(getent passwd $UID 65534) \
12< <(getent group $(id -g) 65534)
;;