move wol out of base
This commit is contained in:
parent
4d660a9a98
commit
3df8b1b4de
3 changed files with 25 additions and 23 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, wol, ... }: {
|
{ ... }: {
|
||||||
boot = {
|
boot = {
|
||||||
kernelModules = [
|
kernelModules = [
|
||||||
"rndis_host"
|
"rndis_host"
|
||||||
|
|
@ -19,28 +19,6 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services."wol" = {
|
|
||||||
enable = wol != "";
|
|
||||||
description = "Wake-on-LAN for ${wol}";
|
|
||||||
requires = [ "network.target" ];
|
|
||||||
after = [ "network.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${pkgs.ethtool}/bin/ethtool -s ${wol} wol g";
|
|
||||||
Type = "oneshot";
|
|
||||||
};
|
|
||||||
wantedBy = [
|
|
||||||
# just in case
|
|
||||||
"multi-user.target"
|
|
||||||
"sleep.target"
|
|
||||||
"suspend.target"
|
|
||||||
"hibernate.target"
|
|
||||||
"hybrid-sleep.target"
|
|
||||||
"shutdown.target"
|
|
||||||
"reboot.target"
|
|
||||||
"halt.target"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
avahi = {
|
avahi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
./misc/programs.nix
|
./misc/programs.nix
|
||||||
./misc/graphics.nix
|
./misc/graphics.nix
|
||||||
./misc/theme.nix
|
./misc/theme.nix
|
||||||
|
./misc/wol.nix
|
||||||
./base.nix
|
./base.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
23
modules/system/misc/wol.nix
Normal file
23
modules/system/misc/wol.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ pkgs, wol, ... }: {
|
||||||
|
systemd.services."wol" = {
|
||||||
|
enable = wol != "";
|
||||||
|
description = "Wake-on-LAN for ${wol}";
|
||||||
|
requires = [ "network.target" ];
|
||||||
|
after = [ "network.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${pkgs.ethtool}/bin/ethtool -s ${wol} wol g";
|
||||||
|
Type = "oneshot";
|
||||||
|
};
|
||||||
|
wantedBy = [
|
||||||
|
# just in case
|
||||||
|
"multi-user.target"
|
||||||
|
"sleep.target"
|
||||||
|
"suspend.target"
|
||||||
|
"hibernate.target"
|
||||||
|
"hybrid-sleep.target"
|
||||||
|
"shutdown.target"
|
||||||
|
"reboot.target"
|
||||||
|
"halt.target"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue