git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/networking: add the wakeonlan option
commitbb3ea37eeed0da6dbd2c6a6c08abbdd16cf5f875 authorlegendofmiracles <legendofmiracles@protonmail.com> dateFri 1 Oct 2021, 18:08 (5 years ago) parent1f70bb3
4 files changed+18
nixos/doc/manual/from_md/release-notes/rl-2111.section.xml+7 nixos/doc/manual/release-notes/rl-2111.section.md+2 nixos/modules/tasks/network-interfaces-scripted.nix+2 nixos/modules/tasks/network-interfaces.nix+7
nixos/doc/manual/from_md/release-notes/rl-2111.section.xml+7
@@ -326,6 +326,13 @@
326326 <section xml:id="sec-release-21.11-incompatibilities">
327327 <title>Backward Incompatibilities</title>
328328 <itemizedlist>
329+ <listitem>
330+ <para>
331+ The <literal>services.wakeonlan</literal> option was removed,
332+ and replaced with
333+ <literal>networking.interfaces.&lt;name&gt;.wakeOnLan</literal>.
334+ </para>
335+ </listitem>
329336 <listitem>
330337 <para>
331338 The <literal>security.wrappers</literal> option now requires
nixos/doc/manual/release-notes/rl-2111.section.md+2
@@ -101,6 +101,8 @@ In addition to numerous new and upgraded packages, this release has the followin
101101
102102## Backward Incompatibilities {#sec-release-21.11-incompatibilities}
103103
104+- The `services.wakeonlan` option was removed, and replaced with `networking.interfaces.<name>.wakeOnLan`.
105+
104106- The `security.wrappers` option now requires to always specify an owner, group and whether the setuid/setgid bit should be set.
105107 This is motivated by the fact that before NixOS 21.11, specifying either setuid or setgid but not owner/group resulted in wrappers owned by nobody/nogroup, which is unsafe.
106108
nixos/modules/tasks/network-interfaces-scripted.nix+2
@@ -61,6 +61,8 @@ let
6161 MACAddress = i.macAddress;
6262 } // optionalAttrs (i.mtu != null) {
6363 MTUBytes = toString i.mtu;
64+ } // optionalAttrs (i.wakeOnLan.enable == true) {
65+ WakeOnLan = "magic";
6466 };
6567 };
6668 in listToAttrs (map createNetworkLink interfaces);
nixos/modules/tasks/network-interfaces.nix+7
@@ -284,6 +284,13 @@ let
284284 '';
285285 };
286286
287+ wakeOnLan = {
288+ enable = mkOption {
289+ type = types.bool;
290+ default = false;
291+ description = "Wether to enable wol on this interface.";
292+ };
293+ };
287294 };
288295
289296 config = {