Replace avahi with systemd-resolved
This commit is contained in:
parent
05a47479f8
commit
7aed3b7e6f
|
@ -22,12 +22,25 @@ in {
|
|||
};
|
||||
systemd.network.wait-online.enable = false;
|
||||
|
||||
# Disable DNSSEC
|
||||
services.resolved.dnssec = "false";
|
||||
# Disable DNSSEC and enable mDNS
|
||||
services.resolved = {
|
||||
enable = true;
|
||||
dnssec = "false";
|
||||
llmnr = "false";
|
||||
extraConfig = ''
|
||||
MulticastDNS=yes
|
||||
'';
|
||||
};
|
||||
|
||||
# Prioritize ethernet over WiFi
|
||||
systemd.network.networks."40-enp0s31f6".dhcpV4Config.RouteMetric = 10;
|
||||
systemd.network.networks."40-wlan0".dhcpV4Config.RouteMetric = 20;
|
||||
systemd.network.networks."40-enp0s31f6" = {
|
||||
dhcpV4Config.RouteMetric = 10;
|
||||
networkConfig.MulticastDNS = "yes";
|
||||
};
|
||||
systemd.network.networks."40-wlan0" = {
|
||||
dhcpV4Config.RouteMetric = 20;
|
||||
networkConfig.MulticastDNS = "yes";
|
||||
};
|
||||
|
||||
# Static IP for home network
|
||||
systemd.network.networks."24-home" = {
|
||||
|
@ -39,13 +52,10 @@ in {
|
|||
address = [ "192.168.13.131/24" ];
|
||||
gateway = [ "192.168.13.1" ];
|
||||
dns = [ "192.168.13.2" ];
|
||||
networkConfig.DNSSEC = "no";
|
||||
};
|
||||
|
||||
# Enable zeroconf
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns = true;
|
||||
networkConfig = {
|
||||
DNSSEC = "no";
|
||||
MulticastDNS = "yes";
|
||||
};
|
||||
};
|
||||
|
||||
# VPN setup
|
||||
|
@ -100,6 +110,7 @@ in {
|
|||
];
|
||||
allowedUDPPorts = [
|
||||
54982 # Calibre Wireless
|
||||
5353 # mDNS
|
||||
];
|
||||
# Allow wireguard traffic
|
||||
extraCommands = ''
|
||||
|
|
Loading…
Reference in New Issue