From 78333e5d845cfb71a5fdb329c39e06ba12b85f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sun, 10 Jun 2012 14:50:44 +0000 Subject: [PATCH] Add a 'named' option to run only for ipv4. I remember the 'named' log was giving annoying messages on systems not ipv6 capable (I can't recall if lacking the kernel ipv6 code or unconfigured ipv6 addresses). svn path=/nixos/trunk/; revision=34419 --- modules/services/networking/bind.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/services/networking/bind.nix b/modules/services/networking/bind.nix index 19619f0383f..1e04b354939 100644 --- a/modules/services/networking/bind.nix +++ b/modules/services/networking/bind.nix @@ -78,6 +78,13 @@ in "; }; + ipv4Only = mkOption { + default = false; + description = " + Only use ipv4, even if the host supports ipv6 + "; + }; + zones = mkOption { default = []; description = " @@ -121,7 +128,7 @@ in ${pkgs.coreutils}/bin/mkdir -p /var/run/named ''; - exec = "${pkgs.bind}/sbin/named -c ${cfg.configFile} -f"; + exec = "${pkgs.bind}/sbin/named ${optionalString cfg.ipv4Only "-4"} -c ${cfg.configFile} -f"; }; };