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