From f1f6f5e6a15a16126c5232f4b8b08a158c73180e Mon Sep 17 00:00:00 2001 From: niten Date: Fri, 23 Aug 2024 11:19:24 -0700 Subject: [PATCH] Disable resolution from /etc/hosts Screws with resolution of the host it's running on (returns 127.0.0.1). --- lib/fudo/adguard-dns-proxy.nix | 1 + lib/instance.nix | 17 ++++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/fudo/adguard-dns-proxy.nix b/lib/fudo/adguard-dns-proxy.nix index 3a02957..cb88c0a 100644 --- a/lib/fudo/adguard-dns-proxy.nix +++ b/lib/fudo/adguard-dns-proxy.nix @@ -72,6 +72,7 @@ let safesearch_enabled = false; use_private_ptr_resolvers = cfg.dns.reverse-dns != [ ]; local_ptr_upstreams = cfg.dns.reverse-dns; + hostsfile_enabled = false; }; tls.enabled = false; filters = imap1 (i: diff --git a/lib/instance.nix b/lib/instance.nix index 5b91cdb..a60f70f 100644 --- a/lib/instance.nix +++ b/lib/instance.nix @@ -19,7 +19,8 @@ in { build-timestamp = mkOption { type = int; - description = "Timestamp associated with the build. Used for e.g. DNS serials."; + description = + "Timestamp associated with the build. Used for e.g. DNS serials."; }; local-domain = mkOption { @@ -45,7 +46,8 @@ in { local-admins = mkOption { type = listOf str; - description = "List of users who should have admin access to the local host."; + description = + "List of users who should have admin access to the local host."; }; local-groups = mkOption { @@ -55,7 +57,8 @@ in { local-hosts = mkOption { type = attrsOf (submodule host.hostOpts); - description = "List of hosts that should be considered local to the current host."; + description = + "List of hosts that should be considered local to the current host."; }; local-users = mkOption { @@ -65,7 +68,8 @@ in { local-networks = mkOption { type = listOf str; - description = "Networks which are considered local to this host, site, or domain."; + description = + "Networks which are considered local to this host, site, or domain."; }; service-home = mkOption { @@ -81,8 +85,7 @@ in { }; config = { - systemd.tmpfiles.rules = [ - "d ${config.instance.service-home} 755 root root - -" - ]; + systemd.tmpfiles.rules = + [ "d ${config.instance.service-home} 755 root root - -" ]; }; }