From d25e5e21070cbacaa33361254a6a0b1e2e7c0e04 Mon Sep 17 00:00:00 2001 From: TQ Hirsch Date: Sat, 25 Feb 2023 16:33:36 +0100 Subject: [PATCH] nixos/powerdns, nixos/pdns-recurser: Symlink configuration into /etc This places a symlink to the running configuration where the admin tools expect it, allowing users to control the powerdns server or recursor without manually specifying a config file. --- nixos/modules/services/networking/pdns-recursor.nix | 2 ++ nixos/modules/services/networking/powerdns.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/nixos/modules/services/networking/pdns-recursor.nix b/nixos/modules/services/networking/pdns-recursor.nix index 2f07cefc736e..af5ea08a3609 100644 --- a/nixos/modules/services/networking/pdns-recursor.nix +++ b/nixos/modules/services/networking/pdns-recursor.nix @@ -159,6 +159,8 @@ in { config = mkIf cfg.enable { + environment.etc."powerdns-recursor".source = configDir; + services.pdns-recursor.settings = mkDefaultAttrs { local-address = cfg.dns.address; local-port = cfg.dns.port; diff --git a/nixos/modules/services/networking/powerdns.nix b/nixos/modules/services/networking/powerdns.nix index 850a128cf1a4..fd82791f21c1 100644 --- a/nixos/modules/services/networking/powerdns.nix +++ b/nixos/modules/services/networking/powerdns.nix @@ -38,6 +38,8 @@ in { config = mkIf cfg.enable { + environment.etc.powerdns.source = finalConfigDir; + systemd.packages = [ pkgs.pdns ]; systemd.services.pdns = {