Updated clamAV configuration. Fixed nextcloud-quirk typo.

This commit is contained in:
Raphaël Numbus
2026-03-01 12:05:30 +01:00
parent ab886a8a0b
commit fad1f51323
3 changed files with 36 additions and 26 deletions
+34 -25
View File
@@ -1,34 +1,43 @@
{ config, lib, pkgs, ... }:
let
cfg = config.numbus.services.clamav;
onAccessPaths = lib.mapAttrsToList (n: v: v.dataDir) (lib.filterAttrs (n: v:
v ? enable && v.enable && v ? dataDir && v.dataDir != false
) config.numbus.services);
in
{
environment.systemPackages = [ pkgs.clamav pkgs.curl ];
services.clamav = {
updater.enable = true;
daemon.enable = true;
scanner = {
enable = true;
interval = "*-*-* 04:00:00"; # Everyday at 4am
scanDirectories = [
"/etc"
"/home"
"/var/lib"
"/var/tmp"
"/tmp"
];
options.numbus.services.clamav = {
enable = mkEnableOption "ClamAV open-source anti-virus software";
};
config.numbus.services.clamav = mkIf cfg.enable {
environment.systemPackages = [ pkgs.clamav pkgs.curl ];
clamonacc.enable = true;
services.clamav = {
updater.enable = true;
clamonacc.enable = true;
daemon.settings = {
OnAccessPrevention = true;
OnAccessIncludePath = "/mnt/data";
scanner = {
enable = true;
interval = "*-*-* 04:00:00"; # Everyday at 4am
scanDirectories = [
"/etc"
"/home"
"/var/lib"
"/var/tmp"
"/tmp"
];
};
daemon = {
enable = true;
settings = {
OnAccessPrevention = true;
OnAccessIncludePath = onAccessPaths;
};
};
};
};
};
services.clamav.daemon.enable = true;
services.clamav.updater.enable = true;
services.clamav.clamonacc.enable = true;
}
+1
View File
@@ -3,6 +3,7 @@
{
imports = [
# ./adguard.nix
./clamav.nix
./frigate.nix
./gitea.nix
./home-assistant.nix
+1 -1
View File
@@ -240,7 +240,7 @@ helper.mkPodmanService {
sudo -u numbus-admin podman exec --user www-data nextcloud-server php occ db:add-missing-indices
sudo -u numbus-admin podman exec --user www-data nextcloud-server php occ maintenance:repair --include-expensive
INSTALL_APPS_LIST=( "calendar" "contacts" "mail" "note" "onlyoffice" "cookbook" "whiteboard" )
INSTALL_APPS_LIST=( "calendar" "contacts" "mail" "notes" "onlyoffice" "cookbook" "whiteboard" )
REMOVE_APPS_LIST=( "activity" "app_api" "federatedfilesharing" "federation" "webhook_listeners" "photos" "recommendations" "sharebymail" "teams" "support" "richdocumentscode" )
CURRENT_APPS_SIGNATURE="$(echo "''${INSTALL_APPS_LIST[@]}" "''${REMOVE_APPS_LIST[@]}")"
APPS_SIGNATURE_FILE="/var/lib/numbus-server/${name}/installed_apps.signature"