mirror of
https://github.com/nix-community/srvos.git
synced 2024-08-17 01:40:26 +03:00
mdns: don't enable it if we already have avahi (#417)
This commit is contained in:
parent
937ddb11d8
commit
d8945920cb
@ -1,7 +1,10 @@
|
||||
{ lib, ... }: {
|
||||
# Allows to find machines on the local network by name, i.e. useful for printer discovery
|
||||
systemd.network.networks."99-ethernet-default-dhcp".networkConfig.MulticastDNS = lib.mkDefault "yes";
|
||||
systemd.network.networks."99-wireless-client-dhcp".networkConfig.MulticastDNS = lib.mkDefault "yes";
|
||||
networking.firewall.allowedUDPPorts = [ 5353 ]; # Multicast DNS
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
# Avahi is an alternative implementation. If it's enabled, than we don't need the code below.
|
||||
config = lib.mkIf (!config.services.avahi.enable) {
|
||||
# Allows to find machines on the local network by name, i.e. useful for printer discovery
|
||||
systemd.network.networks."99-ethernet-default-dhcp".networkConfig.MulticastDNS = lib.mkDefault "yes";
|
||||
systemd.network.networks."99-wireless-client-dhcp".networkConfig.MulticastDNS = lib.mkDefault "yes";
|
||||
networking.firewall.allowedUDPPorts = [ 5353 ]; # Multicast DNS
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user