mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-16 08:38:19 +00:00
Merge pull request #259658 from Majiir/fix-networkd-wakeonlan
nixos/network-interfaces-systemd: fix WakeOnLan
This commit is contained in:
commit
6998695f5d
@ -61,8 +61,6 @@ let
|
||||
MACAddress = i.macAddress;
|
||||
} // optionalAttrs (i.mtu != null) {
|
||||
MTUBytes = toString i.mtu;
|
||||
} // optionalAttrs (i.wakeOnLan.enable == true) {
|
||||
WakeOnLan = concatStringsSep " " i.wakeOnLan.policy;
|
||||
};
|
||||
};
|
||||
in listToAttrs (map createNetworkLink interfaces);
|
||||
|
@ -1463,6 +1463,16 @@ in
|
||||
]
|
||||
++ bridgeStp;
|
||||
|
||||
# Wake-on-LAN configuration is shared by the scripted and networkd backends.
|
||||
systemd.network.links = pipe interfaces [
|
||||
(filter (i: i.wakeOnLan.enable))
|
||||
(map (i: nameValuePair "40-${i.name}" {
|
||||
matchConfig.OriginalName = i.name;
|
||||
linkConfig.WakeOnLan = concatStringsSep " " i.wakeOnLan.policy;
|
||||
}))
|
||||
listToAttrs
|
||||
];
|
||||
|
||||
# The network-interfaces target is kept for backwards compatibility.
|
||||
# New modules must NOT use it.
|
||||
systemd.targets.network-interfaces =
|
||||
|
Loading…
Reference in New Issue
Block a user