Add getSiteNetwork and getSite*PrefixLength
This commit is contained in:
parent
85d0cc2990
commit
1bfc4405b2
11
lib.nix
11
lib.nix
@ -57,8 +57,17 @@ let
|
|||||||
getHostGatewayV6 = hostname:
|
getHostGatewayV6 = hostname:
|
||||||
getSiteGatewayV6 entities.hosts."${hostname}".site;
|
getSiteGatewayV6 entities.hosts."${hostname}".site;
|
||||||
|
|
||||||
|
getSiteNetwork = siteName: entities.sites."${siteName}".network;
|
||||||
|
|
||||||
|
getSiteV4PrefixLength = siteName:
|
||||||
|
toInt (elemAt (splitString "/" (getSiteNetwork siteName)));
|
||||||
|
|
||||||
|
getSiteV6PrefixLength = siteName:
|
||||||
|
abort "not implemented: getSiteV6PrefixLength";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
inherit getHostSite getHostDomain getHostRealm getHostFqdn getHostIpv4
|
inherit getHostSite getHostDomain getHostRealm getHostFqdn getHostIpv4
|
||||||
getHostIpv6 getHostIps getDomainPostgresqlServer getSiteHosts getDomainHosts
|
getHostIpv6 getHostIps getDomainPostgresqlServer getSiteHosts getDomainHosts
|
||||||
getSiteGatewayV4 getHostGatewayV4 getSiteGatewayV6 getHostGatewayV6;
|
getSiteGatewayV4 getHostGatewayV4 getSiteGatewayV6 getHostGatewayV6
|
||||||
|
getSiteV4PrefixLength getSiteV6PrefixLength;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user