diff options
author | TQ Hirsch <thequux@thequux.com> | 2023-02-25 16:33:36 +0100 |
---|---|---|
committer | Nick Cao <nickcao@nichi.co> | 2023-07-01 18:55:50 +0800 |
commit | d25e5e21070cbacaa33361254a6a0b1e2e7c0e04 (patch) | |
tree | 83c2b68cb2f20ddf3900cd36781c68cb3f4d2d52 /nixos | |
parent | 64e3b6239b658a7ce1ce316330fe3c7d018da089 (diff) |
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.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/pdns-recursor.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/networking/powerdns.nix | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/pdns-recursor.nix b/nixos/modules/services/networking/pdns-recursor.nix index 2f07cefc736e3..af5ea08a3609a 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 850a128cf1a46..fd82791f21c1e 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 = { |