Unverified Commit 6998695f authored by Maximilian Bosch's avatar Maximilian Bosch Committed by GitHub
Browse files

Merge pull request #259658 from Majiir/fix-networkd-wakeonlan

nixos/network-interfaces-systemd: fix WakeOnLan
parents 09246068 f5f1751b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);
+10 −0
Original line number Diff line number Diff line
@@ -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 =