summary refs log tree commit diff
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2019-08-22 15:03:14 +0200
committerrnhmjoj <rnhmjoj@inventati.org>2019-08-26 17:46:04 +0200
commit0e0a533d9a185727d088de793b52950263bdef85 (patch)
tree2f736ed57311f4d45ccd341ab3f90788f50ba542
parent92d956267ae5babd8c446942316a099024d3c0fa (diff)
downloadnixpkgs-0e0a533d9a185727d088de793b52950263bdef85.tar
nixpkgs-0e0a533d9a185727d088de793b52950263bdef85.tar.gz
nixpkgs-0e0a533d9a185727d088de793b52950263bdef85.tar.bz2
nixpkgs-0e0a533d9a185727d088de793b52950263bdef85.tar.lz
nixpkgs-0e0a533d9a185727d088de793b52950263bdef85.tar.xz
nixpkgs-0e0a533d9a185727d088de793b52950263bdef85.tar.zst
nixpkgs-0e0a533d9a185727d088de793b52950263bdef85.zip
nixos/pdns-recursor: add luaConfig option
-rw-r--r--nixos/modules/services/networking/pdns-recursor.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/pdns-recursor.nix b/nixos/modules/services/networking/pdns-recursor.nix
index ae22ea17f01..ec69cc838da 100644
--- a/nixos/modules/services/networking/pdns-recursor.nix
+++ b/nixos/modules/services/networking/pdns-recursor.nix
@@ -137,6 +137,14 @@ in {
       '';
     };
 
+    luaConfig = mkOption {
+      type = types.lines;
+      default = "";
+      description = ''
+        The content Lua configuration file for PowerDNS Recursor. See
+        <link xlink:href="https://doc.powerdns.com/recursor/lua-config/index.html"/>.
+      '';
+    };
   };
 
   config = mkIf cfg.enable {
@@ -154,6 +162,7 @@ in {
       export-etc-hosts = cfg.exportHosts;
       dnssec           = cfg.dnssecValidation;
       serve-rfc1918    = cfg.serveRFC1918;
+      lua-config-file  = pkgs.writeText "recursor.lua" cfg.luaConfig;
 
       log-timestamp  = false;
       disable-syslog = true;