def install_package_manager_trees(state: MkosiState) -> None:
+ # Ensure /etc exists in the package manager tree
+ (state.pkgmngr / "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():
+ (state.pkgmngr / "etc/static").symlink_to(Path("/etc/static").readlink())
+
if not state.config.package_manager_trees:
return
for tree in state.config.package_manager_trees:
install_tree(state, tree.source, state.workspace / "pkgmngr", tree.target)
- # Ensure /etc exists in the package manager tree
- (state.pkgmngr / "etc").mkdir(exist_ok=True)
-
def install_extra_trees(state: MkosiState) -> None:
if not state.config.extra_trees:
if p.is_symlink():
cmdline += ["--symlink", p.readlink(), p]
- if Path("/etc/static").is_symlink():
- cmdline += ["--symlink", Path("/etc/static").readlink(), "/etc/static"]
-
if network:
cmdline += ["--bind", "/etc/resolv.conf", "/etc/resolv.conf"]