From 165777e9926285c7765923e5d3f3aa28caf89af7 Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Mon, 21 Oct 2024 09:05:09 +0200 Subject: [PATCH] podvm-image: don't mount tmpfs on /usr This is a prerequisite for using peer pods with GPUs, as they require an OCI hook to facilitate GPU attachment to containers, which is expected in `/usr/share` by default. If we mount a tmpfs on `/usr`, the files placed in the initial image through the `contents` attribute of the repart builder will become invisible, so we now only mount it at `/usr/bin` instead. --- packages/nixos/image.nix | 2 +- packages/nixos/system.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nixos/image.nix b/packages/nixos/image.nix index a62342e0f6..192102e5cc 100644 --- a/packages/nixos/image.nix +++ b/packages/nixos/image.nix @@ -45,7 +45,7 @@ Minimize = "best"; # We need to ensure that mountpoints are available. # TODO (Maybe): This could be done more elegantly with CopyFiles and a skeleton tree in the vcs. - MakeDirectories = "/bin /boot /dev /etc /home /lib /lib64 /mnt /nix /opt /proc /root /run /srv /sys /tmp /usr /var"; + MakeDirectories = "/bin /boot /dev /etc /home /lib /lib64 /mnt /nix /opt /proc /root /run /srv /sys /tmp /usr/bin /var"; }; }; diff --git a/packages/nixos/system.nix b/packages/nixos/system.nix index 300b52f24b..d11a336acc 100644 --- a/packages/nixos/system.nix +++ b/packages/nixos/system.nix @@ -60,7 +60,7 @@ "/var" "/etc" "/bin" - "/usr" + "/usr/bin" "/tmp" "/lib" "/root"