chore(access): network.networks.global

This commit is contained in:
arcnmx 2025-09-06 21:40:48 -07:00
parent 4662495775
commit dd30009b7e
5 changed files with 44 additions and 3 deletions

View file

@ -53,7 +53,10 @@
fallback =
if nameAllowed
then lib.warn "getAddressFor hostname fallback for ${config.networking.hostName} -> ${hostName}@${network}" (access.getHostnameFor hostName network)
else if forSystem.access.global.enable
then lib.warn "getAddressFor global fallback for ${config.networking.hostName} -> ${hostName}@${network}" (mkGetAddressFor true addressForAttr hostName "global")
else err;
global = forSystem.access.${addressForAttr}.global or forSystem.access.address4ForNetwork.global or fallback;
local = forSystem.access.${addressForAttr}.local or forSystem.access.address4ForNetwork.local or fallback;
int = forSystem.access.${addressForAttr}.int or forSystem.access.address4ForNetwork.int or fallback;
tail = forSystem.access.${addressForAttr}.tail or fallback;
@ -66,6 +69,8 @@
then int
else if has'Local && forSystemHas "local"
then local
else if forSystem.access.global.enable && forSystemHas "global"
then global
else fallback;
${
if has'Local
@ -85,6 +90,7 @@
else null
} =
tail;
global = global;
}
.${network}
or fallback;