diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-10 13:28:20 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-10 13:28:20 +0200 |
commit | 5c1f8cbc70cd5e6867ef6a2a06d27a40daa07010 (patch) | |
tree | a6c0f605be6de3f372ae69905b331f9f75452da7 /nixos/modules/services/networking/rdnssd.nix | |
parent | 6070bc016bd2fd945b04347e25cfd3738622d2ac (diff) |
Move all of NixOS to nixos/ in preparation of the repository merge
Diffstat (limited to 'nixos/modules/services/networking/rdnssd.nix')
-rw-r--r-- | nixos/modules/services/networking/rdnssd.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/rdnssd.nix b/nixos/modules/services/networking/rdnssd.nix new file mode 100644 index 0000000000000..f797206ad5c76 --- /dev/null +++ b/nixos/modules/services/networking/rdnssd.nix @@ -0,0 +1,48 @@ +# Module for rdnssd, a daemon that configures DNS servers in +# /etc/resolv/conf from IPv6 RDNSS advertisements. + +{ config, pkgs, ... }: + +with pkgs.lib; + +{ + + ###### interface + + options = { + + services.rdnssd.enable = mkOption { + default = false; + #default = config.networking.enableIPv6; + description = + '' + Whether to enable the RDNSS daemon + (<command>rdnssd</command>), which configures DNS servers in + <filename>/etc/resolv.conf</filename> from RDNSS + advertisements sent by IPv6 routers. + ''; + }; + + }; + + + ###### implementation + + config = mkIf config.services.rdnssd.enable { + + jobs.rdnssd = + { description = "RDNSS daemon"; + + # Start before the network interfaces are brought up so that + # the daemon receives RDNSS advertisements from the kernel. + startOn = "starting network-interfaces"; + + # !!! Should write to /var/run/rdnssd/resolv.conf and run the daemon under another uid. + exec = "${pkgs.ndisc6}/sbin/rdnssd --resolv-file /etc/resolv.conf -u root"; + + daemonType = "fork"; + }; + + }; + +} |