From 89aa2e7f20fa480d60732d9c66b4e6fed1d43133 Mon Sep 17 00:00:00 2001 From: "Giulio De Pasquale (aider)" Date: Sat, 26 Apr 2025 17:10:46 +0100 Subject: [PATCH] refactor: use network groups for allowLAN/VPN in vhost configuration --- modules/core/vhost.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/vhost.nix b/modules/core/vhost.nix index 9d26a23..f6412ce 100644 --- a/modules/core/vhost.nix +++ b/modules/core/vhost.nix @@ -99,8 +99,8 @@ in recommendedProxySettings = location.recommendedProxySettings; extraConfig = '' ${concatMapStringsSep "\n" (allowCIDR: "allow ${allowCIDR};") location.allow} - ${optionalString location.allowLAN ''allow ${config.pepe.core.network.interfaces.${config.pepe.core.network.interfaceTypes.lan}.net};''} - ${optionalString location.allowVPN ''allow ${config.pepe.core.network.interfaces.${config.pepe.core.network.interfaceTypes.vpn}.net};''} + ${optionalString location.allowLAN ''allow ${config.pepe.core.network.groups.lan};''} + ${optionalString location.allowVPN ''allow ${config.pepe.core.network.groups.vpn};''} ${optionalString (!location.allowWAN) "deny all;"} '' + location.extraConfig; })