From 0be82456ab446e4cb3f89f799da21398e4e7c91f Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Wed, 4 Dec 2024 15:55:56 +0900 Subject: [PATCH] Ensure to keep /tmp/lima --- home-manager/lima-host.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home-manager/lima-host.nix b/home-manager/lima-host.nix index b0ca8a56..da335e16 100644 --- a/home-manager/lima-host.nix +++ b/home-manager/lima-host.nix @@ -18,6 +18,12 @@ ]; activation = { + # /tmp/lima will be writable shared by default of lima. However lima does not create the directory, and home-manager file module does not fit under /tmp. + ensureLimaSharedTempdir = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + run mkdir -p /tmp/lima + run touch /tmp/lima/.keep + ''; + # Required to avoid missing systemctl in NixOS # https://github.com/lima-vm/lima/blob/9248baf14a3208249ed38179cdd018ec288d1ef5/pkg/autostart/autostart.go#L91-L92 # In macOS, similar provision for /bin/launchctl