1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

fix: only generate mdns zone if necessary

This commit is contained in:
oddlama 2023-05-29 16:20:36 +02:00
parent 97cb4e0ac5
commit 2d618a28ad
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A

View file

@ -59,17 +59,18 @@
# name to the link name. # name to the link name.
++ mapNetworks (x: config.systemd.network.networks.${x}.matchConfig.Name or null) ++ mapNetworks (x: config.systemd.network.networks.${x}.matchConfig.Name or null)
); );
in { in
zones = lib.mkForce { lib.mkIf (mdnsInterfaces != []) {
mdns.interfaces = mdnsInterfaces; zones = lib.mkForce {
}; mdns.interfaces = mdnsInterfaces;
};
rules = lib.mkForce { rules = lib.mkForce {
mdns-to-local = { mdns-to-local = {
from = ["mdns"]; from = ["mdns"];
to = ["local"]; to = ["local"];
allowedUDPPorts = [5353]; allowedUDPPorts = [5353];
};
}; };
}; };
};
} }