3
0
Fork 0
forked from mirrors/nixpkgs

unbound service: retab

This commit is contained in:
Franz Pletz 2016-02-07 18:40:15 +01:00
parent ffef91e914
commit fe4b0a4801

View file

@ -38,28 +38,28 @@ in
services.unbound = { services.unbound = {
enable = mkOption { enable = mkOption {
default = false; default = false;
description = "Whether to enable the Unbound domain name server."; description = "Whether to enable the Unbound domain name server.";
}; };
allowedAccess = mkOption { allowedAccess = mkOption {
default = ["127.0.0.0/24"]; default = ["127.0.0.0/24"];
description = "What networks are allowed to use unbound as a resolver."; description = "What networks are allowed to use unbound as a resolver.";
}; };
interfaces = mkOption { interfaces = mkOption {
default = [ "127.0.0.1" "::1" ]; default = [ "127.0.0.1" "::1" ];
description = "What addresses the server should listen on."; description = "What addresses the server should listen on.";
}; };
forwardAddresses = mkOption { forwardAddresses = mkOption {
default = [ ]; default = [ ];
description = "What servers to forward queries to."; description = "What servers to forward queries to.";
}; };
extraConfig = mkOption { extraConfig = mkOption {
default = ""; default = "";
description = "Extra lines of unbound config."; description = "Extra lines of unbound config.";
}; };
}; };
@ -88,9 +88,9 @@ in
preStart = '' preStart = ''
mkdir -m 0755 -p ${stateDir}/dev/ mkdir -m 0755 -p ${stateDir}/dev/
cp ${confFile} ${stateDir}/unbound.conf cp ${confFile} ${stateDir}/unbound.conf
chown unbound ${stateDir} chown unbound ${stateDir}
touch ${stateDir}/dev/random touch ${stateDir}/dev/random
${pkgs.utillinux}/bin/mount --bind -n /dev/random ${stateDir}/dev/random ${pkgs.utillinux}/bin/mount --bind -n /dev/random ${stateDir}/dev/random
''; '';