wak on lan custom service

This commit is contained in:
nyanloutre 2020-10-06 00:22:19 +02:00
parent eb1161768f
commit 0167c84fd5
1 changed files with 12 additions and 1 deletions

View File

@ -90,7 +90,18 @@
services.openssh.passwordAuthentication = false;
services.openssh.forwardX11 = true;
services.wakeonlan.interfaces = [ { interface = "eno1"; method = "magicpacket"; } ];
systemd.services = {
"wol" = {
description = "Wake-on-LAN";
wantedBy = [ "multi-user.target" ];
requires = [ "network.target" ];
after = [ "network.target" ];
script = ''
${pkgs.ethtool}/sbin/ethtool -s eno1 wol g
'';
serviceConfig.Type = "oneshot";
};
};
system.stateVersion = "20.03";
}