Unverified Commit b2019639 authored by Martin Weinelt's avatar Martin Weinelt
Browse files

nixos/postfix-tlspol: only preset dns resolver with useLocalResolver

This is the best indicator we have about whether to use a local resolver.

In the meantime I'm lobbying upstream to read /etc/resolv.conf.
parent a18cef07
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
let
  inherit (lib)
    hasPrefix
    literalExpression
    mkEnableOption
    mkIf
    mkMerge
@@ -92,7 +93,13 @@ in
          dns = {
            address = mkOption {
              type = types.str;
              default = "127.0.0.1:53";
              default = if config.networking.resolvconf.useLocalResolver then "127.0.0.1:53" else null;
              defaultText = literalExpression ''
                if config.networking.resolvconf.useLocalResolver then
                  "127.0.0.1:53"
                else
                  null
              '';
              description = ''
                IP and port to your DNS resolver