More util functions
This commit is contained in:
parent
4688003535
commit
7629a979b4
9
lib.nix
9
lib.nix
|
@ -36,8 +36,13 @@ let
|
||||||
getDomainHosts = domain:
|
getDomainHosts = domain:
|
||||||
attrNames
|
attrNames
|
||||||
(filterAttrs (_: hostOpts: hostOpts.domain == domain) entities.hosts);
|
(filterAttrs (_: hostOpts: hostOpts.domain == domain) entities.hosts);
|
||||||
|
|
||||||
|
getSiteGateway = site: entities.sites."${site-name}".gateway-v4;
|
||||||
|
|
||||||
|
getHostGateway = hostname: (getHostSite hostname).gateway-v4;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
inherit getHostSite getHostDomain getHostRealm getHostFqdn getHostIpv4
|
inherit getHostSite getHostDomain getHostRealm getHostFqdn getHostIpv4
|
||||||
getHostIpv6 getHostIps getDomainPostgresqlServer getSiteHosts
|
getHostIpv6 getHostIps getDomainPostgresqlServer getSiteHosts getDomainHosts
|
||||||
getDomainHosts;
|
getSiteGateway getHostGateway;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue