feat(homelab): enable Wake-on-LAN on the mini PCs (#509)

This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-11-02 15:36:29 +08:00
1 parent 7ea9fd3197
commit be3e27c49b
11 files changed
+731 -73

No files matched your search

+6 -22
View File
@@ -6,6 +6,9 @@ that name was decommissioned; this is a different, physical machine that reuses
## Hardware
Manual BIOS and power-saving settings are recorded in
[`docs/bios.md`](../../docs/bios.md#aquamarine).
| Part | Model | Notes |
| ------ | ----------------------------------------------------- | ------------------------------------------------------- |
| Board | Colorful CVN Z890 ARK FROZEN V20 (BIOS 1013) | moved from `ai` on 2026-10-13, so its EFI vars come too |
@@ -288,33 +291,14 @@ The install only touches the target disk; the staging host keeps booting from it
the disk back, restore the `hosts/idols-ai/disko-fs-data.nix` module this change deleted, and
re-enroll that machine's TPM2 slot — see `../idols-ai/README.md`.
## Wake-on-LAN
BIOS: `Advanced > Power Setting` must have `Wake By Lan` enabled, and EUP must not cut standby power
to the NIC. NixOS arms the RTL8125 through `systemd.network.links` using `OriginalName=en*`.
After a boot, verify the link reports `Wake-on: g`:
```bash
ethtool enp133s0 | grep -E 'Supports Wake-on|Wake-on'
```
Wake every homelab host with Wake-on-LAN armed from another L2 host:
```bash
just wake-homelab
```
The command currently wakes only aquamarine; add a host to `scripts/wake-homelab.py` after its WoL
link config and BIOS setting are in place. Test from a powered-off state, not from a reboot.
## Idle suspend
`autosuspend` checks every minute and suspends into S3 after 60 minutes without an active user
session, meaningful CPU load, or an established connection to one of the request-serving ports:
`18080` (ASR), `63081` (llama-swap/Strata), `63083`/`63084` (MagPie), and `65002` (direct Strata).
It calls `systemctl suspend`, so systemd sleep inhibitors are also honored. WoL is armed by the
`systemd.network.links` configuration above; no separate WoL service is needed.
It calls `systemctl suspend`, so systemd sleep inhibitors are also honored. Wake-on-LAN is armed by
the host's `systemd.network.links` configuration; see
[`docs/wake-on-lan.md`](../../docs/wake-on-lan.md). No separate WoL service is needed.
The daemon resets its idle timer after resume, so a wake does not immediately go back to sleep. To
keep the host awake during maintenance: