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.
++ mapNetworks (x: config.systemd.network.networks.${x}.matchConfig.Name or null)
);
in {
zones = lib.mkForce {
mdns.interfaces = mdnsInterfaces;
};
in
lib.mkIf (mdnsInterfaces != []) {
zones = lib.mkForce {
mdns.interfaces = mdnsInterfaces;
};
rules = lib.mkForce {
mdns-to-local = {
from = ["mdns"];
to = ["local"];
allowedUDPPorts = [5353];
rules = lib.mkForce {
mdns-to-local = {
from = ["mdns"];
to = ["local"];
allowedUDPPorts = [5353];
};
};
};
};
}