mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
Merge pull request #110825 from andresilva/appimage-fixes
build-fhs-userenv: fixes for mount points
This commit is contained in:
commit
ab5a9d5746
@ -24,8 +24,6 @@ let
|
||||
"unshareUser" "unshareCgroup" "unshareUts" "unshareNet" "unsharePid" "unshareIpc"
|
||||
]);
|
||||
|
||||
chrootenv = callPackage ./chrootenv {};
|
||||
|
||||
etcBindFlags = let
|
||||
files = [
|
||||
# NixOS Compatibility
|
||||
@ -37,6 +35,8 @@ let
|
||||
"hosts"
|
||||
"resolv.conf"
|
||||
"nsswitch.conf"
|
||||
# User profiles
|
||||
"profiles"
|
||||
# Sudo & Su
|
||||
"login.defs"
|
||||
"sudoers"
|
||||
@ -80,6 +80,11 @@ let
|
||||
if [[ -d ${env}/etc ]]; then
|
||||
for i in ${env}/etc/*; do
|
||||
path="/''${i##*/}"
|
||||
# NOTE: we're binding /etc/fonts from the host so we don't want to
|
||||
# override it with a path from the FHS environment.
|
||||
if [[ $path == '/fonts' ]]; then
|
||||
continue
|
||||
fi
|
||||
ro_mounts+=(--ro-bind "$i" "/etc$path")
|
||||
done
|
||||
fi
|
||||
|
@ -89,6 +89,9 @@ let
|
||||
ln -s /host/etc/resolv.conf resolv.conf
|
||||
ln -s /host/etc/nsswitch.conf nsswitch.conf
|
||||
|
||||
# symlink user profiles
|
||||
ln -s /host/etc/profiles profiles
|
||||
|
||||
# symlink sudo and su stuff
|
||||
ln -s /host/etc/login.defs login.defs
|
||||
ln -s /host/etc/sudoers sudoers
|
||||
|
Loading…
Reference in New Issue
Block a user