nixos/networking: add the wakeonlan option

main
legendofmiracles 3 years ago
parent 1f70bb3297
commit bb3ea37eee
No known key found for this signature in database
GPG Key ID: 19B082B3DEFE5451
  1. 7
      nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
  2. 2
      nixos/doc/manual/release-notes/rl-2111.section.md
  3. 2
      nixos/modules/tasks/network-interfaces-scripted.nix
  4. 7
      nixos/modules/tasks/network-interfaces.nix

@ -326,6 +326,13 @@
<section xml:id="sec-release-21.11-incompatibilities">
<title>Backward Incompatibilities</title>
<itemizedlist>
<listitem>
<para>
The <literal>services.wakeonlan</literal> option was removed,
and replaced with
<literal>networking.interfaces.&lt;name&gt;.wakeOnLan</literal>.
</para>
</listitem>
<listitem>
<para>
The <literal>security.wrappers</literal> option now requires

@ -101,6 +101,8 @@ In addition to numerous new and upgraded packages, this release has the followin
## Backward Incompatibilities {#sec-release-21.11-incompatibilities}
- The `services.wakeonlan` option was removed, and replaced with `networking.interfaces.<name>.wakeOnLan`.
- The `security.wrappers` option now requires to always specify an owner, group and whether the setuid/setgid bit should be set.
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.

@ -61,6 +61,8 @@ let
MACAddress = i.macAddress;
} // optionalAttrs (i.mtu != null) {
MTUBytes = toString i.mtu;
} // optionalAttrs (i.wakeOnLan.enable == true) {
WakeOnLan = "magic";
};
};
in listToAttrs (map createNetworkLink interfaces);

@ -284,6 +284,13 @@ let
'';
};
wakeOnLan = {
enable = mkOption {
type = types.bool;
default = false;
description = "Wether to enable wol on this interface.";
};
};
};
config = {

Loading…
Cancel
Save