diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-10-14 18:01:33 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-14 18:01:33 +0000 |
commit | 879976f6853e154941c0894b9d8ac3fa332fba11 (patch) | |
tree | bcc3e1749d4ba36a668057a0ba7247def7fc53c8 /nixos/modules/tasks | |
parent | a4e2dd0f72c32e6036e8f7c52e172cc4b6d1c5a2 (diff) | |
parent | 8381e32b2cbdddf7d8761afaf43457109952798a (diff) | |
download | nixpkgs-879976f6853e154941c0894b9d8ac3fa332fba11.tar nixpkgs-879976f6853e154941c0894b9d8ac3fa332fba11.tar.gz nixpkgs-879976f6853e154941c0894b9d8ac3fa332fba11.tar.bz2 nixpkgs-879976f6853e154941c0894b9d8ac3fa332fba11.tar.lz nixpkgs-879976f6853e154941c0894b9d8ac3fa332fba11.tar.xz nixpkgs-879976f6853e154941c0894b9d8ac3fa332fba11.tar.zst nixpkgs-879976f6853e154941c0894b9d8ac3fa332fba11.zip |
Merge staging-next into staging
Diffstat (limited to 'nixos/modules/tasks')
-rw-r--r-- | nixos/modules/tasks/network-interfaces-scripted.nix | 2 | ||||
-rw-r--r-- | nixos/modules/tasks/network-interfaces.nix | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix index 67ef152c4b6..da4aa916d65 100644 --- a/nixos/modules/tasks/network-interfaces-scripted.nix +++ b/nixos/modules/tasks/network-interfaces-scripted.nix @@ -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); diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 4900b77de37..eda036cb726 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -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 = |