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.
This commit is contained in:
parent
a18cef0754
commit
b201963951
@ -8,6 +8,7 @@
|
|||||||
let
|
let
|
||||||
inherit (lib)
|
inherit (lib)
|
||||||
hasPrefix
|
hasPrefix
|
||||||
|
literalExpression
|
||||||
mkEnableOption
|
mkEnableOption
|
||||||
mkIf
|
mkIf
|
||||||
mkMerge
|
mkMerge
|
||||||
@ -92,7 +93,13 @@ in
|
|||||||
dns = {
|
dns = {
|
||||||
address = mkOption {
|
address = mkOption {
|
||||||
type = types.str;
|
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 = ''
|
description = ''
|
||||||
IP and port to your DNS resolver
|
IP and port to your DNS resolver
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user