nixos/clamav: add system-clamav.slice
Tracking: https://github.com/NixOS/nixpkgs/issues/279915
This commit is contained in:
parent
7bc08d0195
commit
695b1c874d
@ -164,6 +164,10 @@ in
|
|||||||
environment.etc."clamav/freshclam.conf".source = freshclamConfigFile;
|
environment.etc."clamav/freshclam.conf".source = freshclamConfigFile;
|
||||||
environment.etc."clamav/clamd.conf".source = clamdConfigFile;
|
environment.etc."clamav/clamd.conf".source = clamdConfigFile;
|
||||||
|
|
||||||
|
systemd.slices.system-clamav = {
|
||||||
|
description = "ClamAV slice";
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.clamav-daemon = mkIf cfg.daemon.enable {
|
systemd.services.clamav-daemon = mkIf cfg.daemon.enable {
|
||||||
description = "ClamAV daemon (clamd)";
|
description = "ClamAV daemon (clamd)";
|
||||||
after = optionals cfg.updater.enable [ "clamav-freshclam.service" ];
|
after = optionals cfg.updater.enable [ "clamav-freshclam.service" ];
|
||||||
@ -181,6 +185,7 @@ in
|
|||||||
PrivateTmp = "yes";
|
PrivateTmp = "yes";
|
||||||
PrivateDevices = "yes";
|
PrivateDevices = "yes";
|
||||||
PrivateNetwork = "yes";
|
PrivateNetwork = "yes";
|
||||||
|
Slice = "system-clamav.slice";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -208,6 +213,7 @@ in
|
|||||||
Group = clamavGroup;
|
Group = clamavGroup;
|
||||||
PrivateTmp = "yes";
|
PrivateTmp = "yes";
|
||||||
PrivateDevices = "yes";
|
PrivateDevices = "yes";
|
||||||
|
Slice = "system-clamav.slice";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -229,6 +235,7 @@ in
|
|||||||
Group = clamavGroup;
|
Group = clamavGroup;
|
||||||
PrivateTmp = "yes";
|
PrivateTmp = "yes";
|
||||||
PrivateDevices = "yes";
|
PrivateDevices = "yes";
|
||||||
|
Slice = "system-clamav.slice";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -255,6 +262,7 @@ in
|
|||||||
Group = clamavGroup;
|
Group = clamavGroup;
|
||||||
PrivateTmp = "yes";
|
PrivateTmp = "yes";
|
||||||
PrivateDevices = "yes";
|
PrivateDevices = "yes";
|
||||||
|
Slice = "system-clamav.slice";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -275,6 +283,7 @@ in
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${cfg.package}/bin/clamdscan --multiscan --fdpass --infected --allmatch ${lib.concatStringsSep " " cfg.scanner.scanDirectories}";
|
ExecStart = "${cfg.package}/bin/clamdscan --multiscan --fdpass --infected --allmatch ${lib.concatStringsSep " " cfg.scanner.scanDirectories}";
|
||||||
|
Slice = "system-clamav.slice";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user