From 738b0e957784771fd4482b8ff3b4d06707afaecf Mon Sep 17 00:00:00 2001 From: "Giulio De Pasquale (aider)" Date: Sat, 26 Apr 2025 17:14:17 +0100 Subject: [PATCH] fix: modify network interface type handling to resolve Nix type error --- modules/core/network.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/core/network.nix b/modules/core/network.nix index 70d2ac5..7b052db 100644 --- a/modules/core/network.nix +++ b/modules/core/network.nix @@ -48,7 +48,7 @@ in }; interfacesByType = mkOption { - type = types.attrsOf (types.attrsOf types.anything); + type = types.attrsOf (types.listOf types.str); default = {}; description = "Interfaces grouped by type (lan, wan, vpn) for easy access."; internal = true; @@ -69,9 +69,9 @@ in config = { # Create lists of interfaces by type for easy access elsewhere 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; + lan = lib.attrNames (lib.filterAttrs (_: iface: iface.type == "lan") cfg.interfaces); + wan = lib.attrNames (lib.filterAttrs (_: iface: iface.type == "wan") cfg.interfaces); + vpn = lib.attrNames (lib.filterAttrs (_: iface: iface.type == "vpn") cfg.interfaces); }; # We don't need the groups anymore as we're using interfacesByType directly