nixos/bind: add extraArgs option for command-line arguments (#442322)
This commit is contained in:
@@ -266,6 +266,18 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
extraArgs = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Additional command-line arguments to pass to named.
|
||||
'';
|
||||
example = [
|
||||
"-n"
|
||||
"4"
|
||||
];
|
||||
};
|
||||
|
||||
configFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
default = confFile;
|
||||
@@ -315,7 +327,7 @@ in
|
||||
|
||||
serviceConfig = {
|
||||
Type = "forking"; # Set type to forking, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900788
|
||||
ExecStart = "${bindPkg.out}/sbin/named ${lib.optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile}";
|
||||
ExecStart = "${bindPkg.out}/sbin/named ${lib.optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile} ${lib.concatStringsSep " " cfg.extraArgs}";
|
||||
ExecReload = "${bindPkg.out}/sbin/rndc -k '/etc/bind/rndc.key' reload";
|
||||
ExecStop = "${bindPkg.out}/sbin/rndc -k '/etc/bind/rndc.key' stop";
|
||||
User = bindUser;
|
||||
|
||||
Reference in New Issue
Block a user