Personal Nix setup

Fix up local network resolution

Changed files
+8 -4
modules
router
server
+4 -4
modules/router/network.nix
···
in mkIf cfg.enable {
networking = {
useNetworkd = true;
+
hosts."127.0.0.2" = mkForce [];
firewall = mkIf (intern != null) {
trustedInterfaces = [ "lo" intern.name ];
};
···
services.resolved = {
enable = true;
+
llmnr = "false";
+
domains = [ "~." ];
fallbackDns = [
"1.0.0.1"
] ++ (if cfg.ipv6 then [ "2606:4700:4700::1001" ] else []);
dnsovertls = "opportunistic";
extraConfig = strings.concatStringsSep "\n" [
-
''
-
[Resolve]
-
ReadEtcHosts=no
-
''
+
"[Resolve]"
(optionalString cfg.mdns ''
MulticastDNS=yes
'')
+4
modules/server/caddy.nix
···
:80 {
import network_paths
}
+
+
:443 {
+
import network_paths
+
}
'';
};
};