diff --git a/modules/system/core/network.nix b/modules/system/core/network.nix index 93e0061..2393c8e 100644 --- a/modules/system/core/network.nix +++ b/modules/system/core/network.nix @@ -1,4 +1,4 @@ -{ pkgs, wol, ... }: { +{ ... }: { boot = { kernelModules = [ "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 = { avahi = { enable = true; diff --git a/modules/system/desktop.nix b/modules/system/desktop.nix index baff14a..bd46e6a 100644 --- a/modules/system/desktop.nix +++ b/modules/system/desktop.nix @@ -3,6 +3,7 @@ ./misc/programs.nix ./misc/graphics.nix ./misc/theme.nix + ./misc/wol.nix ./base.nix ]; diff --git a/modules/system/misc/wol.nix b/modules/system/misc/wol.nix new file mode 100644 index 0000000..540d237 --- /dev/null +++ b/modules/system/misc/wol.nix @@ -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" + ]; + }; +} \ No newline at end of file