Get periodic scan to work.
This commit is contained in:
@@ -25,6 +25,12 @@ in
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = [ pkgs.clamav pkgs.curl ];
|
environment.systemPackages = [ pkgs.clamav pkgs.curl ];
|
||||||
|
|
||||||
|
system.activationScripts.clamav-quarantine = ''
|
||||||
|
mkdir -p /quarantine
|
||||||
|
chown clamav:clamav /quarantine
|
||||||
|
chmod 440 /quarantine
|
||||||
|
'';
|
||||||
|
|
||||||
security.sudo.extraRules = [{
|
security.sudo.extraRules = [{
|
||||||
users = [ "clamav" ];
|
users = [ "clamav" ];
|
||||||
commands = [{
|
commands = [{
|
||||||
@@ -66,7 +72,7 @@ in
|
|||||||
onFailure = [ "clamav-virus-notify.service" ];
|
onFailure = [ "clamav-virus-notify.service" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${pkgs.clamav}/bin/clamdscan --fdpass --multiscan ${lib.escapeShellArgs onAccessPaths}";
|
ExecStart = "${pkgs.clamav}/bin/clamdscan --verbose --multiscan --move=/quarantine ${lib.escapeShellArgs onAccessPaths}";
|
||||||
User = "clamav";
|
User = "clamav";
|
||||||
Group = "clamav";
|
Group = "clamav";
|
||||||
SupplementaryGroups = [ "users" ];
|
SupplementaryGroups = [ "users" ];
|
||||||
|
|||||||
Reference in New Issue
Block a user