diff --git a/lib.nix b/lib.nix index 23593a8..cd3ca17 100644 --- a/lib.nix +++ b/lib.nix @@ -36,8 +36,13 @@ let getDomainHosts = domain: attrNames (filterAttrs (_: hostOpts: hostOpts.domain == domain) entities.hosts); + + getSiteGateway = site: entities.sites."${site-name}".gateway-v4; + + getHostGateway = hostname: (getHostSite hostname).gateway-v4; + in { inherit getHostSite getHostDomain getHostRealm getHostFqdn getHostIpv4 - getHostIpv6 getHostIps getDomainPostgresqlServer getSiteHosts - getDomainHosts; + getHostIpv6 getHostIps getDomainPostgresqlServer getSiteHosts getDomainHosts + getSiteGateway getHostGateway; }