macOS: persistent home lives at /Volumes/vmix-home/<user> (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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XsESshRCoBoUVWV9qKURUF
This commit is contained in:
parent
0f9373263d
commit
e241364ce9
4 changed files with 23 additions and 17 deletions
|
|
@ -26,6 +26,7 @@ rec {
|
|||
{ source = desktoppr; name = "desktoppr.pkg"; }
|
||||
];
|
||||
bootScript = ''
|
||||
set -x
|
||||
[ -n "$CONSOLE_USER" ] || { echo "vmix: profile needs a logged-in user (generalize with autoLogon)"; exit 1; }
|
||||
H=$(dscl . -read "/Users/$CONSOLE_USER" NFSHomeDirectory | awk '{print $2}')
|
||||
D() { as_user defaults write "$@"; }
|
||||
|
|
@ -39,11 +40,14 @@ rec {
|
|||
mkdir -p "/Library/Desktop Pictures"; cp "$V/wallpaper".* "$W"; chmod 644 "$W"
|
||||
installer -pkg "$V/desktoppr.pkg" -target / >/dev/null || echo "vmix: WARNING: desktoppr install failed"
|
||||
as_user /usr/local/bin/desktoppr "$W" || echo "vmix: WARNING: could not set the wallpaper"
|
||||
# the wallpaper store is written asynchronously; give it time before the shutdown
|
||||
sleep 15
|
||||
echo "vmix: wallpaper now: $(as_user /usr/local/bin/desktoppr 2>/dev/null)"
|
||||
''}
|
||||
${lib.optionalString (dockApps != null) ''
|
||||
D com.apple.dock persistent-apps -array
|
||||
${lib.concatMapStringsSep "\n" (a: ''
|
||||
D com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>${a}</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>"
|
||||
D com.apple.dock persistent-apps -array-add "<dict><key>tile-type</key><string>file-tile</string><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>file://${a}/</string><key>_CFURLStringType</key><integer>15</integer></dict></dict></dict>"
|
||||
'') dockApps}
|
||||
''}
|
||||
${lib.optionalString dockAutohide ''D com.apple.dock autohide -bool true''}
|
||||
|
|
@ -52,7 +56,7 @@ rec {
|
|||
then ''D -g AppleInterfaceStyle Dark''
|
||||
else ''as_user defaults delete -g AppleInterfaceStyle 2>/dev/null || true'')}
|
||||
as_user killall Dock Finder WindowManager 2>/dev/null || true
|
||||
sleep 3
|
||||
sleep 10
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue