1. BIOS
Redémarrer, spam Del / F2 / F10 selon la carte.
ASUS
Advanced -> APM Configuration -> Power On By PCI-E -> Enabled
ou Advanced -> Onboard Devices -> Wake on LAN -> Enabled
MSI
Settings -> Advanced -> Wake Up Event Setup -> Resume By PCI-E Device -> Enabled
Si ErP Ready est Enabled -> le passer en Disabled (sinon WoL souvent mort)
Gigabyte
Settings -> Platform Power -> ErP -> Disabled
Settings -> IO Ports -> Wake on LAN / Resume by LAN -> Enabled
ou Power -> Wake Up On Lan -> Enabled
F10 pour sauver et quitter.
Si ça marche pas : ErP / Deep Sleep / CEC -> Disabled.
2. Ouvrir le terminal
Trouver l’interface :
ip link show
Exemple : enp42s0
Noter la MAC (link/ether).
3. Créer le fichier
Tape :
sudo nano /etc/nixos/customConfig/wake-on-lan.nix
{ config, pkgs, ... }:
{
networking = {
interfaces.enp42s0.wakeOnLan.enable = true; # <-- ton interface réseau
firewall.allowedUDPPorts = [ 9 ];
};
}
Coller le contenu de wake-on-lan.nix.
Adapter enp42s0 à ton interface.
Ctrl + X -> O -> Entrée
4. Modifier default.nix
Tape :
sudo nano /etc/nixos/customConfig/default.nix
Dans imports :
./wake-on-lan.nix
Ctrl + X -> O -> Entrée
5. Rebuild
Tape :
glf-update && reboot
Désinstallation
Retirer ./wake-on-lan.nix de default.nix, puis :
glf-update && reboot
sudo rm -f /etc/nixos/customConfig/wake-on-lan.nix