commit bf4873eb012235b4d82cd79c4f508064ead301ab Author: Joao Porta <jpedro.porta@gmail.com> Date: Fri Jul 17 17:24:26 2026 -0300 wake on lan
2.2 KiB
2.2 KiB
ADDED Requirements
Requirement: Persistent Wake-on-LAN on the wired NIC
The system SHALL keep the wired Ethernet interface (enp14s0) configured to wake on magic-packet while powered off.
Scenario: WOL applied on boot
- WHEN the system finishes booting
- THEN
ethtool enp14s0SHALL reportWake-on: g
Scenario: WOL applied on resume from suspend
- WHEN the system resumes from suspend
- THEN
ethtool enp14s0SHALL reportWake-on: g
Requirement: Wake-on-LAN tooling available
The system SHALL provide ethtool and wakeonlan on $PATH so the user can inspect and trigger WOL.
Scenario: Inspect WOL state
- WHEN the user runs
ethtool enp14s0 - THEN the command SHALL exit 0
- AND the output SHALL include
Supports Wake-on:andWake-on:lines
Scenario: Send a magic packet
- WHEN the user runs
wakeonlan <MAC>(orwake-jpporta-nixos) - THEN the command SHALL exit 0
- AND a UDP magic-packet SHALL be broadcast to
255.255.255.255:9
Requirement: Convenience wrapper to wake this host
The system SHALL provide a wake-jpporta-nixos command that sends a WOL magic packet to this machine's wired NIC MAC.
Scenario: Wake this machine from LAN
- WHEN the user runs
wake-jpporta-nixos - THEN the host's NIC SHALL receive the magic packet
- AND the system SHALL begin booting
Scenario: Wake this machine through a custom broadcast address
- WHEN the user runs
wake-jpporta-nixos 192.168.0.255 - THEN the magic packet SHALL be sent to the
192.168.0.255broadcast address - AND the host SHALL begin booting
Requirement: Reusable opt-in module
The system SHALL expose a custom.wake-on-lan.enable option that, when enabled, configures all of the above.
Scenario: Module disabled
- WHEN
custom.wake-on-lan.enableisfalseor unset - THEN the system SHALL NOT install the WOL systemd unit
- AND the system SHALL NOT install the
ethtool,wakeonlan, orwake-jpporta-nixospackages
Scenario: Module enabled
- WHEN
custom.wake-on-lan.enableistrue - THEN the WOL systemd unit SHALL be active
- AND the
wake-jpporta-nixoscommand SHALL be on$PATH