From 2d1266fb05817c433d6ae9d145ed693deffa2572 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 9 Jul 2019 17:55:59 +0200 Subject: ... --- hel.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hel.nix b/hel.nix index e2718ce9..82ec5109 100644 --- a/hel.nix +++ b/hel.nix @@ -144,10 +144,14 @@ }; systemd.services."unbound" = { - path = with pkgs; [ unbound openssl ]; - preStart = '' - unbound-control-setup -d /var/lib/unbound + if [[ -d /etc/unbound ]]; then + ${pkgs.util-linux}/bin/mkdir -p /var/lib/unbound/etc/unbound + ${pkgs.util-linux}/bin/mount --bind -n /etc/unbound /var/lib/unbound/etc/unbound + fi + ''; + postStop = '' + ${pkgs.util-linux}/bin/umount /var/lib/unbound/etc/unbound ''; }; @@ -157,6 +161,7 @@ extraConfig = '' remote-control: control-enable: yes + ''; }; -- cgit v1.2.3