diff --git a/modules/core/network.nix b/modules/core/network.nix index acd9f3e..1d6d830 100644 --- a/modules/core/network.nix +++ b/modules/core/network.nix @@ -46,11 +46,18 @@ in default = { }; description = "An attribute set of networks with their configurations."; }; + + interfacesByType = mkOption { + type = types.attrsOf (types.attrsOf types.anything); + default = {}; + description = "Interfaces grouped by type (lan, wan, vpn) for easy access."; + internal = true; + }; }; config = { # Create lists of interfaces by type for easy access elsewhere - cfg.interfacesByType = { + pepe.core.network.interfacesByType = { lan = lib.filterAttrs (_: iface: iface.type == "lan") cfg.interfaces; wan = lib.filterAttrs (_: iface: iface.type == "wan") cfg.interfaces; vpn = lib.filterAttrs (_: iface: iface.type == "vpn") cfg.interfaces;