diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2018-10-02 00:07:25 +0200 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2018-10-02 00:26:38 +0200 |
commit | f8d681a91f77a5bc40e65358137f83dcb02759be (patch) | |
tree | 5f439967f0d256013c97e7fa52eb90ee897b42cc | |
parent | 94de259013beabc0b642e46d62a780d2ddce5e6c (diff) | |
download | nixlib-f8d681a91f77a5bc40e65358137f83dcb02759be.tar nixlib-f8d681a91f77a5bc40e65358137f83dcb02759be.tar.gz nixlib-f8d681a91f77a5bc40e65358137f83dcb02759be.tar.bz2 nixlib-f8d681a91f77a5bc40e65358137f83dcb02759be.tar.lz nixlib-f8d681a91f77a5bc40e65358137f83dcb02759be.tar.xz nixlib-f8d681a91f77a5bc40e65358137f83dcb02759be.tar.zst nixlib-f8d681a91f77a5bc40e65358137f83dcb02759be.zip |
nixos/clamav: fix daemon/updater services toggling
-rw-r--r-- | nixos/modules/services/security/clamav.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/services/security/clamav.nix b/nixos/modules/services/security/clamav.nix index 9ad0095252de..b3af4d85cc4b 100644 --- a/nixos/modules/services/security/clamav.nix +++ b/nixos/modules/services/security/clamav.nix @@ -95,7 +95,7 @@ in environment.etc."clamav/freshclam.conf".source = freshclamConfigFile; environment.etc."clamav/clamd.conf".source = clamdConfigFile; - systemd.services.clamav-daemon = optionalAttrs cfg.daemon.enable { + systemd.services.clamav-daemon = mkIf cfg.daemon.enable { description = "ClamAV daemon (clamd)"; after = optional cfg.updater.enable "clamav-freshclam.service"; requires = optional cfg.updater.enable "clamav-freshclam.service"; @@ -116,7 +116,7 @@ in }; }; - systemd.timers.clamav-freshclam = optionalAttrs cfg.updater.enable { + systemd.timers.clamav-freshclam = mkIf cfg.updater.enable { description = "Timer for ClamAV virus database updater (freshclam)"; wantedBy = [ "timers.target" ]; timerConfig = { @@ -125,7 +125,7 @@ in }; }; - systemd.services.clamav-freshclam = optionalAttrs cfg.updater.enable { + systemd.services.clamav-freshclam = mkIf cfg.updater.enable { description = "ClamAV virus database updater (freshclam)"; restartTriggers = [ freshclamConfigFile ]; |