nixos/privoxy: make certificate-directory optional

The tmpfiles.d rule should only be added if inspectHttps is enabled.
This commit is contained in:
rnhmjoj 2021-03-11 08:02:09 +01:00
parent 7008b7e015
commit 7962df46fe
No known key found for this signature in database
GPG key ID: BFBAF4C975F76450

View file

@ -205,9 +205,8 @@ in
users.groups.privoxy = {};
systemd.tmpfiles.rules = with cfg.settings; [
"d ${certificate-directory} 0770 privoxy privoxy ${cfg.certsLifetime}"
];
systemd.tmpfiles.rules = optional cfg.inspectHttps
"d ${cfg.settings.certificate-directory} 0770 privoxy privoxy ${cfg.certsLifetime}";
systemd.services.privoxy = {
description = "Filtering web proxy";