More util functions
This commit is contained in:
9
lib.nix
9
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user