# Ensure /etc exists in the sandbox
(dst / "etc").mkdir(exist_ok=True)
- # Required to be able to access certificates in the sandbox when running from nix.
- if Path("/etc/static").is_symlink():
- (dst / "etc/static").symlink_to(Path("/etc/static").readlink())
-
if Path("/etc/passwd").exists():
shutil.copy("/etc/passwd", dst / "etc/passwd")
if Path("/etc/group").exists():
Path("etc/ssl"),
Path("etc/ca-certificates"),
Path("etc/pacman.d/gnupg"),
+ Path("etc/static"),
Path("var/lib/ca-certificates"),
)
if (root / subdir).exists()
]
return flatten(
- ("--ro-bind", src, target)
+ ("--symlink", src.readlink(), target) if src.is_symlink() else ("--ro-bind", src, target)
for src, target
in sorted(set(mounts), key=lambda s: s[1])
)