refactor(mac-mini): Wake on LAN 改用原生 networking.wakeOnLan 选项

This commit is contained in:
2026-04-11 20:22:57 +08:00
parent 7686f7209b
commit 27df617701
+3 -2
View File
@@ -15,13 +15,14 @@
power.restartAfterPowerFailure = true; power.restartAfterPowerFailure = true;
power.restartAfterFreeze = true; power.restartAfterFreeze = true;
# ── Wake on LAN ──────────────────────────────────
networking.wakeOnLan.enable = true;
# ── Screen Sharing (VNC) & pmset ───────────────── # ── Screen Sharing (VNC) & pmset ─────────────────
system.activationScripts.postActivation.text = '' system.activationScripts.postActivation.text = ''
# VNC # VNC
launchctl enable system/com.apple.screensharing launchctl enable system/com.apple.screensharing
launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist 2>/dev/null || true launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist 2>/dev/null || true
# Wake on LAN
pmset -a womp 1
# Disable Power Nap # Disable Power Nap
pmset -a powernap 0 pmset -a powernap 0
''; '';