From 344485d836a9c52e6106a5b6de0cd9050b5d6751 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 8 Jun 2020 09:59:02 -0400 Subject: [PATCH] Explain why we copy out of the mount --- quickly.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/quickly.nix b/quickly.nix index 9719c1d..6d484ca 100644 --- a/quickly.nix +++ b/quickly.nix @@ -57,6 +57,12 @@ in mkdir "/mnt-root/nix/.squash/$dest" mount -t squashfs -o loop "$f" "/mnt-root/nix/.squash/$dest" ( + # Ideally, these would not be copied and the mounts would be + # used directly. However, we can't: systemd tries to unmount + # them all at shutdown and gets stuck. The trade-off here is + # an increased RAM requirement and a slightly slower + # start-up. However, all that is much faster than needing + # to recreate the entire squashfs every time. cd /mnt-root/nix/store/ cp -ar "../.squash/$dest/$dest" "./$dest" )