From e241364ce95d32641900e21c4acccedb81573f8b Mon Sep 17 00:00:00 2001 From: Git Sagar Date: Wed, 9 Sep 2026 22:17:04 -0300 Subject: [PATCH] macOS: persistent home lives at /Volumes/vmix-home/ (no mount over /Users) macOS refuses to mount a volume over /Users (firmlink), and a failing fstab entry also suppresses the automount. Point NFSHomeDirectory at the automounted volume instead. Profile: Dock entries need tile-type/file URL; wait for the wallpaper store before shutting down. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01XsESshRCoBoUVWV9qKURUF --- lib/images/macos/README.md | 12 +++++++----- lib/images/macos/templates/generalize.nix | 18 +++++++++--------- lib/images/macos/templates/profile/default.nix | 8 ++++++-- nixos/vms/submoduleOptions.nix | 2 +- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/lib/images/macos/README.md b/lib/images/macos/README.md index 94e1d45..1ae904a 100644 --- a/lib/images/macos/README.md +++ b/lib/images/macos/README.md @@ -154,11 +154,13 @@ net, sound, balloon, vsock — QEMU's modern virtio-pci devices work as-is: for every `shares.` beyond the first. `vmix run --macos --share DIR`. (9p does not automount on macOS; the Linux `-virtfs` path is not used.) * **ephemeral OS disk + persistent home**: `generalize { persistHome = true; }` - adds `LABEL=vmix-home /Users apfs rw 0 2` to the image's fstab. The host - provides a virtio-blk disk (`macos.homeDisk` in the module, `--home FILE` in - the CLI: qcow2/raw file or zvol) that `formatVolume` formats as APFS - `vmix-home` by booting the PE for ~35 s on first use. macOS mounts it at - `/Users` before login, home directories are created there; the OS disk can run + gives the account its home directory on an APFS volume labelled `vmix-home` + (`NFSHomeDirectory = /Volumes/vmix-home/`; macOS refuses mounts over + `/Users`, which is a firmlink). The host provides a virtio-blk disk + (`macos.homeDisk` in the module, `--home FILE` in the CLI: qcow2/raw file or + zvol) that `formatVolume` formats as APFS `vmix-home` by booting the PE for + ~35 s on first use; diskarbitrationd mounts it before login and loginwindow + creates the home directory there on first login. The OS disk can then run with `snapshot=on` (`disks.os.persist = false`). * **SPICE**: `-vga vmware` (or `std`) is kept as the display device — macOS has no QXL/virtio-gpu driver; USB redirection channels work as for other guests diff --git a/lib/images/macos/templates/generalize.nix b/lib/images/macos/templates/generalize.nix index b2a6e5b..de2fa2c 100644 --- a/lib/images/macos/templates/generalize.nix +++ b/lib/images/macos/templates/generalize.nix @@ -22,9 +22,10 @@ uuid ? null, mac ? null, seed ? "${hostname}-${username}", - # mount an APFS volume labelled vmix-home (a virtio-blk/AHCI disk the host - # provides, formatted by the PE on first start) at /Users: ephemeral OS disk, - # persistent home directories + # keep the user's home on an APFS volume labelled vmix-home (a virtio-blk disk + # the host provides, formatted by the PE on first start). macOS refuses mounts + # over /Users (firmlink), so the volume automounts at /Volumes/