From 349446a312572581558335be9a18c6b067543f5d Mon Sep 17 00:00:00 2001 From: Andrej Utz Date: Fri, 4 Apr 2025 16:27:34 +0200 Subject: [PATCH] nixos/dhcpcd: ignore WireGuard interfaces WireGuard is layer-3 only (Sec. 1 [1]), so such interfaces won't work at all without an initial IP. Therefore `dhcpcd` is not only useless here, but may add undesireable side effects (#260402, [2]). [1]: https://www.wireguard.com/papers/wireguard.pdf [2]: https://github.com/cprussin/dotfiles/commit/5a7b955d5c0b8499769f3c5c58e578bab015ffab Signed-off-by: Andrej Utz --- nixos/modules/services/networking/dhcpcd.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix index 308ae1278a1b..f74887d3f7b5 100644 --- a/nixos/modules/services/networking/dhcpcd.nix +++ b/nixos/modules/services/networking/dhcpcd.nix @@ -32,6 +32,7 @@ let ) (lib.attrValues config.networking.vswitches) ) ++ lib.concatLists (lib.attrValues (lib.mapAttrs (n: v: v.interfaces) config.networking.bonds)) + ++ lib.attrNames config.networking.wireguard.interfaces ++ config.networking.dhcpcd.denyInterfaces; arrayAppendOrNull =