nextdns: remove darwin support Use nextdns CLI instead
1 file changed, 4 insertions(+), 40 deletions(-)
changed files
M system/modules/nextdns.nix → system/modules/nextdns.nix
@@ -20,22 +20,6 @@ {'2a07:a8c1::', hostname='${identifyingPrefix}${cfg.configID}.dns2.nextdns.io'} }))) ''; }; - - 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 = {@@ -56,12 +40,6 @@ networking.nextdns.identifyDevice = mkOption { type = types.bool; 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"; }; };@@ -69,28 +47,14 @@ 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; }; }