nixos/clamav: run as clamav user not root

This commit is contained in:
happysalada 2023-11-20 20:49:53 +01:00 committed by Yt
parent ef6b8ff15a
commit eb746540a9

View File

@ -110,6 +110,8 @@ in
serviceConfig = {
ExecStart = "${pkg}/bin/clamd";
ExecReload = "${pkgs.coreutils}/bin/kill -USR2 $MAINPID";
User = clamavUser;
Group = clamavGroup;
StateDirectory = "clamav";
RuntimeDirectory = "clamav";
PrivateTmp = "yes";
@ -138,6 +140,8 @@ in
SuccessExitStatus = "1"; # if databases are up to date
StateDirectory = "clamav";
RuntimeDirectory = "clamav";
User = clamavUser;
Group = clamavGroup;
PrivateTmp = "yes";
PrivateDevices = "yes";
};