diff options
Diffstat (limited to 'hel.nix')
-rw-r--r-- | hel.nix | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -144,10 +144,14 @@ | |||
144 | }; | 144 | }; |
145 | 145 | ||
146 | systemd.services."unbound" = { | 146 | systemd.services."unbound" = { |
147 | path = with pkgs; [ unbound openssl ]; | ||
148 | |||
149 | preStart = '' | 147 | preStart = '' |
150 | unbound-control-setup -d /var/lib/unbound | 148 | if [[ -d /etc/unbound ]]; then |
149 | ${pkgs.util-linux}/bin/mkdir -p /var/lib/unbound/etc/unbound | ||
150 | ${pkgs.util-linux}/bin/mount --bind -n /etc/unbound /var/lib/unbound/etc/unbound | ||
151 | fi | ||
152 | ''; | ||
153 | postStop = '' | ||
154 | ${pkgs.util-linux}/bin/umount /var/lib/unbound/etc/unbound | ||
151 | ''; | 155 | ''; |
152 | }; | 156 | }; |
153 | 157 | ||
@@ -157,6 +161,7 @@ | |||
157 | extraConfig = '' | 161 | extraConfig = '' |
158 | remote-control: | 162 | remote-control: |
159 | control-enable: yes | 163 | control-enable: yes |
164 | |||
160 | ''; | 165 | ''; |
161 | }; | 166 | }; |
162 | 167 | ||