]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
bubblewrap: add /etc/static symlink 2211/head
authorMalte Poll <1780588+malt3@users.noreply.github.com>
Fri, 22 Dec 2023 12:06:11 +0000 (13:06 +0100)
committerMalte Poll <1780588+malt3@users.noreply.github.com>
Fri, 22 Dec 2023 13:00:47 +0000 (14:00 +0100)
On NixOS, ssl certificates are stored as follows:

/etc/ssl/certs/ca-bundle.crt -> /etc/static/ssl/certs/ca-bundle.crt
/etc/static -> /nix/store/<HASH>-etc/etc

Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
mkosi/bubblewrap.py

index 7c1550bca85a30e3c6aabebd7950588c013479eb..853b4232ef3be4f9cf121150313234d047e69aa6 100644 (file)
@@ -105,6 +105,9 @@ def bwrap(
         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"]