]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
bubblewrap: try to mount /nix/store readonly
authorMalte Poll <1780588+malt3@users.noreply.github.com>
Fri, 22 Dec 2023 11:41:10 +0000 (12:41 +0100)
committerMalte Poll <1780588+malt3@users.noreply.github.com>
Fri, 22 Dec 2023 12:41:09 +0000 (13:41 +0100)
Similar to most usrmerged systems, NixOS stores all installed
binaries and libraries in /nix/store.
To make mkosi work on NixOS, the nix store should be mounted by default.

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

index 13f9517b5d3cd057725e66131677ed8ba186d4e2..7c1550bca85a30e3c6aabebd7950588c013479eb 100644 (file)
@@ -79,6 +79,7 @@ def bwrap(
     cmdline: list[PathString] = [
         "bwrap",
         "--ro-bind", "/usr", "/usr",
+        "--ro-bind-try", "/nix/store", "/nix/store",
         "--bind", "/var/tmp", "/var/tmp",
         "--bind", "/tmp", "/tmp",
         "--bind", Path.cwd(), Path.cwd(),