nixos/clamav: replace mkIf [] with optional

This commit is contained in:
Léo Gaspard
2018-01-06 16:52:14 +01:00
committed by Joachim Fasting
parent b2d2b37771
commit 7b878a443a
+2 -2
View File
@@ -97,8 +97,8 @@ in
systemd.services.clamav-daemon = optionalAttrs cfg.daemon.enable { systemd.services.clamav-daemon = optionalAttrs cfg.daemon.enable {
description = "ClamAV daemon (clamd)"; description = "ClamAV daemon (clamd)";
after = mkIf cfg.updater.enable [ "clamav-freshclam.service" ]; after = optional cfg.updater.enable "clamav-freshclam.service";
requires = mkIf cfg.updater.enable [ "clamav-freshclam.service" ]; requires = optional cfg.updater.enable "clamav-freshclam.service";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
restartTriggers = [ clamdConfigFile ]; restartTriggers = [ clamdConfigFile ];