nixpkgs/nixos/modules/services/networking
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
..
firefox firefox.syncserver service: Fix missing dependency 2017-12-08 22:18:57 +00:00
ircd-hybrid treewide: use boolToString function 2017-04-11 18:18:53 +02:00
keepalived nixos/keepalived: Implemented vrrp-instance tracking scripts and interfaces. 2018-05-08 11:25:53 +02:00
nghttpx nixos/nghttpx: add module for the nghttpx proxy server (#31680) 2017-11-16 18:21:02 +00:00
ssh nixos/sshd: add options for kexAlgorithms, ciphers and MACs 2018-04-20 19:05:19 +02:00
strongswan-swanctl strongswan-swanctl: actually removed the strongswan parameter files 2018-03-26 17:18:08 +02:00
amuled.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
aria2.nix aria2 (nixos): actually load the module 2018-01-31 09:42:03 +08:00
asterisk.nix service.asterisk: add package option 2017-02-02 15:16:00 +01:00
atftpd.nix nixos/atftpd: various improvements 2016-10-17 16:20:24 +02:00
autossh.nix
avahi-daemon.nix avahi-daemon service: add cacheEntriesMax option 2017-08-04 02:10:11 +02:00
babeld.nix babeld module: updated example config 2017-11-10 11:54:21 +01:00
bind.nix nixos/bind: Allow to set extra options 2018-05-30 05:07:39 +02:00
bird.nix bird2: init at 2.0.1 2018-02-11 23:35:05 +01:00
bitlbee.nix bitlbee service: Add option to load libpurple plugins into bitlbee 2017-07-16 14:19:39 +01:00
btsync.nix treewide: use boolToString function 2017-04-11 18:18:53 +02:00
charybdis.nix charybdis service: add option to configure MOTD (#25512) 2017-05-25 23:28:50 +02:00
chrony.nix nixos.chrony: remove generatecommandkey option 2017-02-07 18:01:58 +01:00
cjdns.nix nixos/cjdns: fix service for i686 (#40740) 2018-05-20 01:01:42 +02:00
cntlm.nix cntlm service: cleanup non working config options (#26578) 2017-06-15 12:11:48 +02:00
connman.nix connmand: add extraFlags option to service 2018-02-15 23:37:12 +01:00
consul.nix consul service: Restart on failure. 2017-09-28 00:41:15 +02:00
coturn.nix coturn service: Fix coturn to properly come up (#29415) 2017-09-18 14:54:32 +02:00
dante.nix dante service: default for logoutput 2018-04-26 13:57:11 +03:00
ddclient.nix nixos ddclient: support multiple domains and run via systemd timer 2018-04-15 10:17:46 +08:00
dhcpcd.nix Merge pull request #35141 from abbradar/dhcpcd-order 2018-02-20 16:07:49 +00:00
dhcpd.nix nixos/dhcp: fix permissions of statedir 2018-04-04 16:26:25 +02:00
dnscache.nix dnscache service: cleanup and add forwardOnly 2018-04-13 15:38:13 +03:00
dnschain.nix nixos/dnschain: use nodePackages.dnschain 2017-10-31 22:03:38 +01:00
dnscrypt-proxy.nix nixos/dnscrypt-proxy: fix apparmor profile and test 2018-05-20 02:25:42 +02:00
dnscrypt-proxy.xml Added cross-references to NixOS manual 2018-04-12 09:39:14 +10:00
dnscrypt-wrapper.nix nixos/dnscrypt-wrapper: fix rotate script failing to restart the service 2018-01-05 02:37:09 +01:00
dnsmasq.nix Revert "dnsmasq nixos: make sure it always runs" 2017-10-14 14:42:49 +08:00
ejabberd.nix
fakeroute.nix fakeroute: add service 2016-11-23 15:23:10 +01:00
ferm.nix nixos/treewide: remove boolean examples for options 2017-03-17 23:36:19 +01:00
fireqos.nix nixos/fireqos: add service 2017-09-09 00:29:46 +02:00
firewall.nix firewall service: run stop commands in reload 2018-04-17 12:41:36 +03:00
flannel.nix flannel service: fix enable expression 2017-01-22 21:58:39 +01:00
flashpolicyd.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
freenet.nix
freeradius.nix nixos/freeradius : init - Added freeradius service 2018-02-10 09:59:01 +01:00
gale.nix Fixing a bunch of issues 2017-01-29 01:58:12 -06:00
gateone.nix
gdomap.nix
git-daemon.nix
gnunet.nix nixos/gnunet: create switch for package. 2018-05-11 13:54:00 +02:00
gogoclient.nix
gvpe.nix
hans.nix nixos/hans, nixos/iodine: fix passwordFile attribute 2018-04-23 23:40:47 +03:00
haproxy.nix
heyefi.nix
hostapd.nix hostapd: remove assertion (allow 5GHz channels) 2018-05-11 13:56:18 +03:00
htpdate.nix
i2p.nix
i2pd.nix nixos/i2pd: tunnel config fixes 2017-11-30 17:13:42 -08:00
iodine.nix nixos/hans, nixos/iodine: fix passwordFile attribute 2018-04-23 23:40:47 +03:00
iwd.nix iwd: 2017-12-14 -> 0.1 2018-03-07 20:28:12 +02:00
keybase.nix keybase service: Turn off debug logging 2017-11-03 14:45:08 -04:00
kippo.nix nixos: use types.lines for extraConfig 2016-10-23 19:41:43 +02:00
kresd.nix kresd service: add listenTLS option 2018-02-12 20:48:25 +01:00
lambdabot.nix
libreswan.nix nixos/libreswan: add missing runtime dependencies 2017-10-22 15:36:26 +02:00
lldpd.nix lldpd module: create a lldpd user as system user 2018-01-01 14:22:58 +01:00
logmein-hamachi.nix
mailpile.nix
matterbridge.nix matterbridge module: add configPath option as a workaround, waiting for nix encryption 2018-04-25 01:37:37 +02:00
minidlna.nix minidlna nixos module: add loglevel config 2018-04-09 00:16:06 +01:00
miniupnpd.nix
miredo.nix miredo: Improve service description 2017-05-18 15:57:26 +02:00
mjpg-streamer.nix
monero.nix nixos/monero: init 2018-02-07 08:04:36 -05:00
mosquitto.nix Multiple users with hashedPassword is broken in mosquitto 2018-02-08 22:46:06 +01:00
mstpd.nix
murmur.nix murmur: fix /tmp usage 2018-04-10 20:27:59 +02:00
namecoind.nix namecoin service: fix typo 2017-09-15 23:08:53 +02:00
nat.nix nixos/nat: support nat reflection 2018-02-19 13:16:09 +00:00
ndppd.nix ndppd module: init (#35533) 2018-05-05 00:33:20 -05:00
networkmanager.nix NetworkManager: add noDns option 2018-05-08 13:42:39 +02:00
nftables.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
ngircd.nix
nix-serve.nix nix-serve: nix 2.0 fixes 2018-03-05 19:32:42 +00:00
nixops-dns.nix nixos/nixops-dns: init (#34511) 2018-02-20 10:14:55 +00:00
nntp-proxy.nix nntp-proxy module: use enum 2016-11-16 22:36:53 +09:00
nsd.nix nixos/nsd: Allow to configure root zone 2018-05-07 04:05:41 +02:00
ntopng.nix
ntpd.nix ntp: make timesyncd the new default 2016-12-17 00:00:45 +01:00
nylon.nix nixos: nylon, use named instances 2017-01-30 20:32:06 +01:00
oidentd.nix
openfire.nix openfire service: more informative assertion failure message 2016-12-10 20:35:43 +01:00
openntpd.nix nixos.openntpd: don't spam systemd journal 2017-02-20 22:35:51 +01:00
openvpn.nix openvpn: remove redundant timestamps from log output 2018-04-21 14:17:22 +02:00
ostinato.nix
pdns-recursor.nix pdns-recursor: add service 2017-01-23 17:57:48 +01:00
pdnsd.nix
polipo.nix
powerdns.nix
pptpd.nix
prayer.nix Getting rid of the var indirection and using a bin path instead 2017-01-29 04:11:01 -06:00
privoxy.nix privoxy service: remove static uid 2016-12-05 13:37:08 +01:00
prosody.nix nixos/prosody: fix pidfile path 2018-04-13 11:38:52 +02:00
quagga.nix quagga service: fix service and re-enable test 2018-03-25 21:26:45 +02:00
quassel.nix Fix typo introduced by #22677 2017-02-15 23:44:11 +00:00
racoon.nix
radicale.nix nixos: rename system.{stateVersion,defaultChannel} -> system.nixos.\1 2018-05-12 19:27:09 +00:00
radvd.nix radvd service: fix due to systemd upgrade 2018-02-15 07:02:08 +01:00
rdnssd.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
redsocks.nix redsocks module: initialize 2017-02-09 18:01:14 +01:00
resilio.nix resilio: Adjust option description to 3d17573 2018-03-11 01:18:34 +01:00
rpcbind.nix rpcbind service: use upstream systemd unit 2017-02-01 02:45:19 +03:00
rxe.nix nixos/rdma-core: add module for soft RoCE and test (#34607) 2018-02-10 07:52:03 +00:00
sabnzbd.nix
searx.nix searx: 0.11.0 -> 0.12.0 2017-08-01 06:16:03 +02:00
seeks.nix
shadowsocks.nix shadowsocks service: init 2018-04-13 13:39:21 +03:00
shairport-sync.nix
shout.nix
skydns.nix etcd: make all service using etc go to 127.0.0.1:2379 by default 2016-11-11 23:11:54 +01:00
smokeping.nix smokeping service: restart on-failure 2017-04-12 15:23:19 +02:00
sniproxy.nix
softether.nix softether module: fix dataDir option 2018-02-22 18:37:59 +03:00
spiped.nix
squid.nix squid service: intial service based on default config 2017-09-09 12:44:46 +02:00
sslh.nix treewide: use boolToString function 2017-04-11 18:18:53 +02:00
strongswan.nix strongswan module: make it work with ipsec l2tp 2018-02-07 13:21:49 +09:00
stubby.nix Add stubby resolver daemon service module (#38667) 2018-05-16 15:16:30 +02:00
stunnel.nix nixos/stunnel: add module (#33151) 2018-01-21 11:23:07 +00:00
supplicant.nix nixos/wpa_supplicant: use literalExample 2017-09-15 20:27:48 +02:00
supybot.nix
syncthing.nix syncthing,qsyncthingtray: remove syncthing-inotify 2018-02-24 01:08:44 +01:00
tcpcrypt.nix nixos: tcpcrypt: /var/run -> /run, don't drop files out of rundir 2018-03-30 06:56:38 +00:00
teamspeak3.nix
tftpd.nix nixos/tftpd: change default dir from /home/tftp to /srv/tftp 2016-10-25 17:20:52 +02:00
tinc.nix tinc: enable invitations 2018-02-23 11:59:37 -05:00
tinydns.nix nixos/tinydns: default data to empty string 2017-09-24 15:38:25 +01:00
tox-bootstrapd.nix nixos/tox-bootstrapd: new command line format 2018-02-23 03:26:18 +00:00
toxvpn.nix toxvpn: 20161230 -> 2017-06-25 2017-06-25 20:17:20 -03:00
tvheadend.nix
unbound.nix nixos/unbound: don't fail on root trust anchor updates 2018-04-01 23:56:42 +02:00
unifi.nix unifi, nixos/unifi: support LTS (5.6.36) and release (5.7.20) 2018-04-28 00:27:33 +02:00
vsftpd.nix vsftpd: Expose the no_anon_password flag. 2017-03-19 01:53:29 +00:00
wakeonlan.nix
websockify.nix
wicd.nix
wireguard.nix wireguard: Enable tools on other platforms 2018-05-19 01:17:26 +03:00
wpa_supplicant.nix nixos/wireless: add manual network configuration 2017-11-11 23:11:46 +01:00
xinetd.nix nixos: use types.lines for extraConfig 2016-10-23 19:41:43 +02:00
xl2tpd.nix
xrdp.nix xrdp: environment.pathsToLink from xserver.nix 2017-05-02 21:08:07 +00:00
zerobin.nix
zerotierone.nix zerotier module: add option to join networks and open port 2018-03-28 22:18:25 +01:00
znc.nix Safer defaults for immutable znc config (#30155) 2017-10-07 16:38:14 +01:00