network.interfaces: Add option to configure WakeOnLan policy

Adds an option to configure a custom WakeOnLan policy instead of the
hard-coded "magic" policy. To ensure compatibility with current
behavior, "magic" is kept as default.
This commit is contained in:
ign0tus
2023-09-28 20:06:28 +02:00
parent 237f7ba7d2
commit 27d0a8a0cd
2 changed files with 19 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ let
} // optionalAttrs (i.mtu != null) {
MTUBytes = toString i.mtu;
} // optionalAttrs (i.wakeOnLan.enable == true) {
WakeOnLan = "magic";
WakeOnLan = concatStringsSep " " i.wakeOnLan.policy;
};
};
in listToAttrs (map createNetworkLink interfaces);