Merge pull request #95050 from paumr/bind-fmt

This commit is contained in:
Sandro 2021-05-10 19:06:00 +02:00 committed by GitHub
commit f0bb4f066a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@ let
slaves = mkOption {
type = types.listOf types.str;
description = "Addresses who may request zone transfers.";
default = [];
default = [ ];
};
extraConfig = mkOption {
type = types.str;
@ -105,7 +105,7 @@ in
enable = mkEnableOption "BIND domain name server";
cacheNetworks = mkOption {
default = ["127.0.0.0/24"];
default = [ "127.0.0.0/24" ];
type = types.listOf types.str;
description = "
What networks are allowed to use us as a resolver. Note
@ -117,7 +117,7 @@ in
};
blockedNetworks = mkOption {
default = [];
default = [ ];
type = types.listOf types.str;
description = "
What networks are just blocked.
@ -141,7 +141,7 @@ in
};
listenOn = mkOption {
default = ["any"];
default = [ "any" ];
type = types.listOf types.str;
description = "
Interfaces to listen on.
@ -149,7 +149,7 @@ in
};
listenOnIpv6 = mkOption {
default = ["any"];
default = [ "any" ];
type = types.listOf types.str;
description = "
Ipv6 interfaces to listen on.
@ -157,7 +157,7 @@ in
};
zones = mkOption {
default = [];
default = [ ];
type = with types; coercedTo (listOf attrs) bindZoneCoerce (attrsOf (types.submodule bindZoneOptions));
description = "
List of zones we claim authority over.
@ -166,8 +166,8 @@ in
"example.com" = {
master = false;
file = "/var/dns/example.com";
masters = ["192.168.0.1"];
slaves = [];
masters = [ "192.168.0.1" ];
slaves = [ ];
extraConfig = "";
};
};
@ -212,7 +212,8 @@ in
networking.resolvconf.useLocalResolver = mkDefault true;
users.users.${bindUser} =
{ uid = config.ids.uids.bind;
{
uid = config.ids.uids.bind;
description = "BIND daemon user";
};
@ -232,9 +233,9 @@ in
'';
serviceConfig = {
ExecStart = "${pkgs.bind.out}/sbin/named -u ${bindUser} ${optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile} -f";
ExecStart = "${pkgs.bind.out}/sbin/named -u ${bindUser} ${optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile} -f";
ExecReload = "${pkgs.bind.out}/sbin/rndc -k '/etc/bind/rndc.key' reload";
ExecStop = "${pkgs.bind.out}/sbin/rndc -k '/etc/bind/rndc.key' stop";
ExecStop = "${pkgs.bind.out}/sbin/rndc -k '/etc/bind/rndc.key' stop";
};
unitConfig.Documentation = "man:named(8)";