From 57250f8deeffb892cb45a0850f0ab6ee07ccaee4 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 10 Sep 2020 14:57:15 +0200 Subject: nextdns: remove darwin support Use nextdns CLI instead --- system/modules/nextdns.nix | 44 ++++---------------------------------------- 1 file changed, 4 insertions(+), 40 deletions(-) (limited to 'system/modules/nextdns.nix') diff --git a/system/modules/nextdns.nix b/system/modules/nextdns.nix index 830215e6..021c65d3 100644 --- a/system/modules/nextdns.nix +++ b/system/modules/nextdns.nix @@ -20,22 +20,6 @@ let }))) ''; }; - - stubbyConfig = { - enable = true; - fallbackProtocols = lib.mkDefault [ "GETDNS_TRANSPORT_TLS" ]; - roundRobinUpstreams = lib.mkDefault false; - upstreamServers = '' - - address_data: 45.90.28.0 - tls_auth_name: "${identifyingPrefix}${cfg.configID}.dns1.nextdns.io" - - address_data: 2a07:a8c0::0 - tls_auth_name: "${identifyingPrefix}${cfg.configID}.dns1.nextdns.io" - - address_data: 45.90.30.0 - tls_auth_name: "${identifyingPrefix}${cfg.configID}.dns2.nextdns.io" - - address_data: 2a07:a8c1::0 - tls_auth_name: "${identifyingPrefix}${cfg.configID}.dns2.nextdns.io" - ''; - }; in { options = { @@ -57,40 +41,20 @@ in default = false; description = "Whether to send hostname for identifying in your logs"; }; - - networking.nextdns.resolver = mkOption { - type = types.enum [ "kresd" "stubby" ]; - default = if stdenv.isDarwin then "stubby" else "kresd"; - description = "Resolver to use"; - }; }; config = mkIf cfg.enable { assertions = [ { - assertion = !(stdenv.isDarwin && cfg.resolver == "kresd"); - message = "kresd is not supported on Darwin"; + assertion = !(stdenv.isDarwin); + message = "NextDNS module is not supported on Darwin"; } ]; - networking = if stdenv.isDarwin then - { - dns = [ - "::1" - "127.0.0.1" - "2a07:a8c0::ab:d6e5" - "2a07:a8c1::ab:d6e5" - "45.90.28.25" - "45.90.30.25" - ]; - } else { + networking = { networkmanager.dns = "none"; resolvconf.useLocalResolver = true; }; - services = { - stubby = mkIf (cfg.resolver == "stubby") stubbyConfig; - } // mkIf (!stdenv.isDarwin) { - kresd = mkIf (cfg.resolver == "kresd") kresdConfig; - }; + services.kresd = kresdConfig; }; } -- cgit 1.4.1