nixpkgs-suyu/nixos/modules
aszlig 94bc38e6c1
nixos/bind: Allow to set extra options
BIND doesn't allow the options section (or any section I'd guess) to be
defined more than once, so whenever you want to set an additional option
you're stuck using weird hacks like this:

services.bind.forwarders = lib.mkForce [ "}; empty-zones-enable no; #" ];

This basically exploits the fact that values coming from the module
options aren't escaped and thus works in a similar vain to how SQL
injection works.

Another option would be to just set configFile to a file that includes
all the options, including zones. That obviously makes the configuration
way less extensible and more awkward to use with the module system.

To make sure this change does work correctly I added a small test just
for that. The test could use some improvements, but better to have a
test rather than none at all. For a future improvement the test could be
merged with the NSD test, because both use the same zone file format.

This change has been reviewed in #40053 and after not getting any
opposition, I'm hereby adding this to master.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @peti, @edolstra
Closes: #40053
2018-05-30 05:07:39 +02:00
..
config iproute2: module to create rt_table file & co 2018-05-15 21:55:04 +09:00
hardware
i18n/input-method
installer Remove all references to absent nixos-prepare-root 2018-05-18 09:53:11 -04:00
misc meguca: init at git-2018-05-17 2018-05-26 07:03:49 -05:00
profiles nixos/installer: Drop dmraid 2018-05-25 01:55:51 +03:00
programs Merge pull request #38791 from LnL7/nixos-profile-variables 2018-05-30 00:23:34 +02:00
security manual: Clarify that limits.conf doesn't apply to systemd services. (#40267) 2018-05-12 17:44:57 +02:00
services nixos/bind: Allow to set extra options 2018-05-30 05:07:39 +02:00
system nixos/systemd-timesyncd: use the correct server list (#40919) 2018-05-24 22:44:04 +00:00
tasks nixos.modules.tasks.swraid: add raid10 module to initrd 2018-05-28 23:49:35 +03:00
testing nixos/tests: set default stateVersion in test VMs 2018-05-14 00:01:15 +02:00
virtualisation nixos: rename system.{stateVersion,defaultChannel} -> system.nixos.\1 2018-05-12 19:27:09 +00:00
module-list.nix meguca: init at git-2018-05-17 2018-05-26 07:03:49 -05:00
rename.nix kubernetes: update to 1.10 2018-05-25 10:50:36 +02:00