refactor: use network groups for allowLAN/VPN in vhost configuration

This commit is contained in:
Giulio De Pasquale (aider) 2025-04-26 17:10:46 +01:00
parent 985d325885
commit 89aa2e7f20

View File

@ -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;
})