summary refs log tree commit diff
path: root/nixos/modules/services/networking
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2017-03-10 14:20:30 +0100
committerJoachim Fasting <joachifm@fastmail.fm>2017-03-15 01:12:43 +0100
commit472002f2164916f3271918aa0470fac205e94518 (patch)
tree021caafd127526133ee4c031a30f2b0f7117ee4d /nixos/modules/services/networking
parent540740598e6765e75a5f589928bb9b886f427341 (diff)
downloadnixlib-472002f2164916f3271918aa0470fac205e94518.tar
nixlib-472002f2164916f3271918aa0470fac205e94518.tar.gz
nixlib-472002f2164916f3271918aa0470fac205e94518.tar.bz2
nixlib-472002f2164916f3271918aa0470fac205e94518.tar.lz
nixlib-472002f2164916f3271918aa0470fac205e94518.tar.xz
nixlib-472002f2164916f3271918aa0470fac205e94518.tar.zst
nixlib-472002f2164916f3271918aa0470fac205e94518.zip
nixos/dnscrypt-proxy: remove the resolverList option
This option was initially added to make it easier to use an
up-to-date list, but now that we always use an up-to-date list
from upstream, there's no point to the option.

From now on, you can either use a resolver listed by dnscrypt
upstream or a custom resolver.
Diffstat (limited to 'nixos/modules/services/networking')
-rw-r--r--nixos/modules/services/networking/dnscrypt-proxy.nix30
1 files changed, 12 insertions, 18 deletions
diff --git a/nixos/modules/services/networking/dnscrypt-proxy.nix b/nixos/modules/services/networking/dnscrypt-proxy.nix
index d0fc0a79c60a..2be86df9ece1 100644
--- a/nixos/modules/services/networking/dnscrypt-proxy.nix
+++ b/nixos/modules/services/networking/dnscrypt-proxy.nix
@@ -15,16 +15,13 @@ let
   };
 
   # Internal flag indicating whether the upstream resolver list is used.
-  useUpstreamResolverList = cfg.resolverList == null && cfg.customResolver == null;
+  useUpstreamResolverList = cfg.customResolver == null;
 
   # The final local address.
   localAddress = "${cfg.localAddress}:${toString cfg.localPort}";
 
   # The final resolvers list path.
-  resolverList =
-    if (cfg.resolverList != null)
-      then cfg.resolverList
-      else "${stateDirectory}/dnscrypt-resolvers.csv";
+  resolverList = "${stateDirectory}/dnscrypt-resolvers.csv";
 
   # Build daemon command line
 
@@ -88,19 +85,11 @@ in
         default = "dnscrypt.eu-nl";
         type = types.nullOr types.str;
         description = ''
-          The name of the upstream DNSCrypt resolver to use, taken from
-          <filename>${resolverList}</filename>.  The default resolver is
-          located in Holland, supports DNS security extensions, and
-          <emphasis>claims</emphasis> to not keep logs.
-        '';
-      };
-
-      resolverList = mkOption {
-        default = null;
-        type = types.nullOr types.path;
-        description = ''
-          List of DNSCrypt resolvers.  The default is to use the list of
-          public resolvers provided by upstream.
+          The name of the DNSCrypt resolver to use, taken from
+          <filename>${resolverList}</filename>.  The default
+          resolver is located in Holland, supports DNS security
+          extensions, and <emphasis>claims</emphasis> to not
+          keep logs.
         '';
       };
 
@@ -319,5 +308,10 @@ in
       (config:
         let val = getAttrFromPath [ "services" "dnscrypt-proxy" "ephemeralKeys" ] config; in
         optional val "-E"))
+
+    (mkRemovedOptionModule [ "services" "dnscrypt-proxy" "resolverList" ] ''
+      The current resolver listing from upstream is always used
+      unless a custom resolver is specified.
+    '')
   ];
 }