lol

nixos/bind: add extraArgs option for command-line arguments (#442322)

authored by

kirillrdy and committed by
GitHub
6caa2d12 92127274

+13 -1
+13 -1
nixos/modules/services/networking/bind.nix
··· 266 266 ''; 267 267 }; 268 268 269 + extraArgs = lib.mkOption { 270 + type = lib.types.listOf lib.types.str; 271 + default = [ ]; 272 + description = '' 273 + Additional command-line arguments to pass to named. 274 + ''; 275 + example = [ 276 + "-n" 277 + "4" 278 + ]; 279 + }; 280 + 269 281 configFile = lib.mkOption { 270 282 type = lib.types.path; 271 283 default = confFile; ··· 315 327 316 328 serviceConfig = { 317 329 Type = "forking"; # Set type to forking, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900788 318 - ExecStart = "${bindPkg.out}/sbin/named ${lib.optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile}"; 330 + ExecStart = "${bindPkg.out}/sbin/named ${lib.optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile} ${lib.concatStringsSep " " cfg.extraArgs}"; 319 331 ExecReload = "${bindPkg.out}/sbin/rndc -k '/etc/bind/rndc.key' reload"; 320 332 ExecStop = "${bindPkg.out}/sbin/rndc -k '/etc/bind/rndc.key' stop"; 321 333 User = bindUser;