wak on lan custom service
This commit is contained in:
parent
eb1161768f
commit
0167c84fd5
@ -90,7 +90,18 @@
|
|||||||
services.openssh.passwordAuthentication = false;
|
services.openssh.passwordAuthentication = false;
|
||||||
services.openssh.forwardX11 = true;
|
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";
|
system.stateVersion = "20.03";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user