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
1 changed files with 12 additions and 11 deletions

View File

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