diff options
author | Majiir Paktu <majiir@nabaal.net> | 2023-10-07 20:57:11 -0400 |
---|---|---|
committer | Majiir Paktu <majiir@nabaal.net> | 2023-10-07 20:58:51 -0400 |
commit | d290c309f40dff0e8e38f610ea20340cabac488e (patch) | |
tree | 63d7a7a2618606df8f5d7834ed199c6e383d9afd /nixos/modules | |
parent | 679733b3adb6ab06154adb93c345e75fd3f1c2ab (diff) | |
download | nixpkgs-d290c309f40dff0e8e38f610ea20340cabac488e.tar nixpkgs-d290c309f40dff0e8e38f610ea20340cabac488e.tar.gz nixpkgs-d290c309f40dff0e8e38f610ea20340cabac488e.tar.bz2 nixpkgs-d290c309f40dff0e8e38f610ea20340cabac488e.tar.lz nixpkgs-d290c309f40dff0e8e38f610ea20340cabac488e.tar.xz nixpkgs-d290c309f40dff0e8e38f610ea20340cabac488e.tar.zst nixpkgs-d290c309f40dff0e8e38f610ea20340cabac488e.zip |
nixos/network-interfaces-systemd: fix WakeOnLan
WakeOnLan= was configured when using the scripted backend but not the networkd backend. The other link options are set in the .network file when using networkd, but WakeOnLan= is only available in a .link file.
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/tasks/network-interfaces-systemd.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/modules/tasks/network-interfaces-systemd.nix b/nixos/modules/tasks/network-interfaces-systemd.nix index 53097e21c64..1ef168d6079 100644 --- a/nixos/modules/tasks/network-interfaces-systemd.nix +++ b/nixos/modules/tasks/network-interfaces-systemd.nix @@ -389,6 +389,16 @@ in }; }))) vlanNetworks + { + 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 + ]; + } ]; # We need to prefill the slaved devices with networking options |