commit f1dfb1f9768f061dcdcb9f3aacfa65c17235d697 parent 333327be759c30552ef2cc090c17df9fe16b9d28 Author: Daniel Barlow <dan@telent.net> Date: Thu, 31 Aug 2023 18:24:09 +0100 BRIDGE_VLAN_FILTERING depends on bridge _and_ vlan I'm half-pleased with this. It demonstrates how we can have complex conditional kernel config, but the way we detect if vlan exists is tacky. Diffstat:
| M | modules/bridge/default.nix | | | 8 | ++++++-- |
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/bridge/default.nix b/modules/bridge/default.nix @@ -41,7 +41,11 @@ in }; config.kernel.config = { BRIDGE = "y"; - BRIDGE_VLAN_FILTERING = "y"; BRIDGE_IGMP_SNOOPING = "y"; - }; + } // lib.optionalAttrs (config.system.service ? vlan) { + # depends on bridge _and_ vlan. I would like there to be + # a better way to test for the existence of vlan config: + # maybe the module should set an `enabled` attribute? + BRIDGE_VLAN_FILTERING = "y"; + }; }