From 4ba062d0dbfac46239057f65e3949118590544d0 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Sun, 16 Apr 2023 17:15:49 +0200 Subject: [PATCH] [Network] Enable WakeOnLan by unicast packet on all physical interfaces --- network.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/network.nix b/network.nix index 25fde92..d524eb0 100644 --- a/network.nix +++ b/network.nix @@ -47,6 +47,12 @@ in }; }; + services.udev.extraRules = concatStringsSep "\n" [ + (optionalString (!config.aviallon.laptop.enable) '' + ACTION=="add", SUBSYSTEM=="net", NAME=="enp*", RUN+="${pkgs.ethtool}/bin/ethtool -s $name wol gu" + '') + ]; + services.unbound.enable = (cfg.dns == "unbound"); networking.networkmanager = {