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"
|
"unshareUser" "unshareCgroup" "unshareUts" "unshareNet" "unsharePid" "unshareIpc"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
chrootenv = callPackage ./chrootenv {};
|
|
||||||
|
|
||||||
etcBindFlags = let
|
etcBindFlags = let
|
||||||
files = [
|
files = [
|
||||||
# NixOS Compatibility
|
# NixOS Compatibility
|
||||||
@ -37,6 +35,8 @@ let
|
|||||||
"hosts"
|
"hosts"
|
||||||
"resolv.conf"
|
"resolv.conf"
|
||||||
"nsswitch.conf"
|
"nsswitch.conf"
|
||||||
|
# User profiles
|
||||||
|
"profiles"
|
||||||
# Sudo & Su
|
# Sudo & Su
|
||||||
"login.defs"
|
"login.defs"
|
||||||
"sudoers"
|
"sudoers"
|
||||||
@ -80,6 +80,11 @@ let
|
|||||||
if [[ -d ${env}/etc ]]; then
|
if [[ -d ${env}/etc ]]; then
|
||||||
for i in ${env}/etc/*; do
|
for i in ${env}/etc/*; do
|
||||||
path="/''${i##*/}"
|
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")
|
ro_mounts+=(--ro-bind "$i" "/etc$path")
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
@ -89,6 +89,9 @@ let
|
|||||||
ln -s /host/etc/resolv.conf resolv.conf
|
ln -s /host/etc/resolv.conf resolv.conf
|
||||||
ln -s /host/etc/nsswitch.conf nsswitch.conf
|
ln -s /host/etc/nsswitch.conf nsswitch.conf
|
||||||
|
|
||||||
|
# symlink user profiles
|
||||||
|
ln -s /host/etc/profiles profiles
|
||||||
|
|
||||||
# symlink sudo and su stuff
|
# symlink sudo and su stuff
|
||||||
ln -s /host/etc/login.defs login.defs
|
ln -s /host/etc/login.defs login.defs
|
||||||
ln -s /host/etc/sudoers sudoers
|
ln -s /host/etc/sudoers sudoers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user