mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
24 lines
626 B
Bash
24 lines
626 B
Bash
#! @shell@ -e
|
|
|
|
chrootenvDest=/run/chrootenv/@name@
|
|
|
|
# Bind mount the Nix store
|
|
mount --bind /nix/store $chrootenvDest/nix/store
|
|
|
|
# Bind mount some kernel related stuff
|
|
mount --bind /dev $chrootenvDest/dev
|
|
mount --bind /dev/pts $chrootenvDest/dev/pts
|
|
mount --bind /dev/shm $chrootenvDest/dev/shm
|
|
mount --bind /proc $chrootenvDest/proc
|
|
mount --bind /sys $chrootenvDest/sys
|
|
|
|
# Bind mount home directories
|
|
mount --bind /home $chrootenvDest/home
|
|
|
|
# Bind mount state directories
|
|
mount --bind /var $chrootenvDest/var
|
|
mount --bind /run $chrootenvDest/run
|
|
|
|
# Bind mount the host system's /etc
|
|
mount --bind /etc $chrootenvDest/host-etc
|