nixos/bind: add directory config option (#129188)
This commit is contained in:
parent
7914c1284c
commit
bb568917b2
1 changed files with 10 additions and 1 deletions
|
@ -61,7 +61,7 @@ let
|
||||||
blackhole { badnetworks; };
|
blackhole { badnetworks; };
|
||||||
forward first;
|
forward first;
|
||||||
forwarders { ${concatMapStrings (entry: " ${entry}; ") cfg.forwarders} };
|
forwarders { ${concatMapStrings (entry: " ${entry}; ") cfg.forwarders} };
|
||||||
directory "/run/named";
|
directory "${cfg.directory}";
|
||||||
pid-file "/run/named/named.pid";
|
pid-file "/run/named/named.pid";
|
||||||
${cfg.extraOptions}
|
${cfg.extraOptions}
|
||||||
};
|
};
|
||||||
|
@ -166,6 +166,12 @@ in
|
||||||
";
|
";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
directory = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/run/named";
|
||||||
|
description = "Working directory of BIND.";
|
||||||
|
};
|
||||||
|
|
||||||
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));
|
||||||
|
@ -240,6 +246,9 @@ in
|
||||||
|
|
||||||
${pkgs.coreutils}/bin/mkdir -p /run/named
|
${pkgs.coreutils}/bin/mkdir -p /run/named
|
||||||
chown ${bindUser} /run/named
|
chown ${bindUser} /run/named
|
||||||
|
|
||||||
|
${pkgs.coreutils}/bin/mkdir -p ${cfg.directory}
|
||||||
|
chown ${bindUser} ${cfg.directory}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
|
Loading…
Reference in a new issue