refactor: trust-dns: listenAddrs -> listenAddrsIpv4
This commit is contained in:
parent
e040a5b0c5
commit
d5e8974a4a
|
@ -96,24 +96,24 @@ in
|
|||
{
|
||||
wan = {
|
||||
substitutions = mkSubstitutions "wan";
|
||||
listenAddrs = [
|
||||
listenAddrsIpv4 = [
|
||||
nativeAddrs."servo.lan"
|
||||
bindOvpn
|
||||
];
|
||||
};
|
||||
lan = {
|
||||
substitutions = mkSubstitutions "lan";
|
||||
listenAddrs = [ nativeAddrs."servo.lan" ];
|
||||
listenAddrsIpv4 = [ nativeAddrs."servo.lan" ];
|
||||
port = 1053;
|
||||
};
|
||||
hn = {
|
||||
substitutions = mkSubstitutions "hn";
|
||||
listenAddrs = [ nativeAddrs."servo.hn" ];
|
||||
listenAddrsIpv4 = [ nativeAddrs."servo.hn" ];
|
||||
port = 1053;
|
||||
};
|
||||
# hn-resolver = {
|
||||
# # don't need %AWAN% here because we forward to the hn instance.
|
||||
# listenAddrs = [ nativeAddrs."servo.hn" ];
|
||||
# listenAddrsIpv4 = [ nativeAddrs."servo.hn" ];
|
||||
# extraConfig = {
|
||||
# zones = [
|
||||
# {
|
||||
|
|
|
@ -13,7 +13,7 @@ let
|
|||
type = types.port;
|
||||
default = 53;
|
||||
};
|
||||
listenAddrs = mkOption {
|
||||
listenAddrsIpv4 = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "127.0.0.1" ];
|
||||
description = ''
|
||||
|
@ -78,13 +78,13 @@ let
|
|||
};
|
||||
});
|
||||
|
||||
mkSystemdService = flavor: { includes, listenAddrs, port, substitutions, extraConfig, ... }: let
|
||||
mkSystemdService = flavor: { includes, listenAddrsIpv4, port, substitutions, extraConfig, ... }: let
|
||||
sed = "${pkgs.gnused}/bin/sed";
|
||||
configTemplate = toml.generate "trust-dns-${flavor}.toml" (
|
||||
(
|
||||
lib.filterAttrsRecursive (_: v: v != null) config.services.trust-dns.settings
|
||||
) // {
|
||||
listen_addrs_ipv4 = listenAddrs;
|
||||
listen_addrs_ipv4 = listenAddrsIpv4;
|
||||
} // extraConfig
|
||||
);
|
||||
configPath = "/var/lib/trust-dns/${flavor}-config.toml";
|
||||
|
@ -211,7 +211,7 @@ in
|
|||
};
|
||||
|
||||
sane.services.trust-dns.instances.localhost = lib.mkIf cfg.asSystemResolver {
|
||||
listenAddrs = [ "127.0.0.1" ];
|
||||
listenAddrsIpv4 = [ "127.0.0.1" ];
|
||||
enableRecursiveResolver = true;
|
||||
# append zones discovered via DHCP to the resolver config.
|
||||
includes = [ "/var/lib/trust-dns/dhcp-configs/*" ];
|
||||
|
|
Loading…
Reference in New Issue
Block a user