From 91e739c91b430b2ad0b711eb5495c0c3016b1bd4 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Tue, 11 Apr 2023 11:33:17 +0200 Subject: [PATCH] Fix resolving local names with resolved --- modules/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/default.nix b/modules/default.nix index 212d97e..49f467c 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -128,8 +128,16 @@ "de_DE.UTF-8/UTF-8" ]); - # Set systemd-resolved’s fallback to Quad9 (instead of cloudflare/google) - services.resolved.fallbackDns = [ "9.9.9.9" "149.112.112.112" "2620:fe::fe" "2620:fe::9" ]; + services.resolved = { + # Set systemd-resolved’s fallback to Quad9 (instead of cloudflare/google) + fallbackDns = [ "9.9.9.9" "149.112.112.112" "2620:fe::fe" "2620:fe::9" ]; + # Allow resolving single lable hostnames (e.g., hostnames on the local network) + llmnr = "false"; + # resolved does not automatically append the search domain (for whatever reason) + extraConfig = '' + ResolveUnicastSingleLabel=yes + ''; + }; } (lib.mkIf config.sbruder.full { services.fwupd.enable = true;