Include only real hosts from local site in hosts
This commit is contained in:
parent
8279a28d15
commit
29405fae48
@ -116,15 +116,10 @@ in {
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
fudo.system.hostfile-entries = let
|
fudo.system.hostfile-entries = mapAttrs' (hostname: _:
|
||||||
other-hosts =
|
nameValuePair (getHostIpv4 hostname) [ (getHostFqdn hostname) hostname ])
|
||||||
filterAttrs (hostname: hostOpts: hostname != config.instance.hostname)
|
(filterAttrs (_: hostOpts: hostOpts.site == config.instance.local-site)
|
||||||
cfg.zone-definition.hosts;
|
config.fudo.hosts);
|
||||||
in mapAttrs' (hostname: hostOpts:
|
|
||||||
nameValuePair hostOpts.ipv4-address [
|
|
||||||
"${hostname}.${cfg.domain}"
|
|
||||||
hostname
|
|
||||||
]) other-hosts;
|
|
||||||
|
|
||||||
services.kea.dhcp4 = {
|
services.kea.dhcp4 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user