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
+19 -10
View File
@@ -1,11 +1,23 @@
{ config, lib, pkgs, ... }: { 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
{ {
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 ]; environment.systemPackages = [ pkgs.clamav pkgs.curl ];
services.clamav = { services.clamav = {
updater.enable = true; updater.enable = true;
daemon.enable = true; clamonacc.enable = true;
scanner = { scanner = {
enable = true; enable = true;
@@ -19,16 +31,13 @@ services.clamav = {
]; ];
}; };
daemon = {
clamonacc.enable = true; enable = true;
settings = {
daemon.settings = {
OnAccessPrevention = true; OnAccessPrevention = true;
OnAccessIncludePath = "/mnt/data"; 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 = [ imports = [
# ./adguard.nix # ./adguard.nix
./clamav.nix
./frigate.nix ./frigate.nix
./gitea.nix ./gitea.nix
./home-assistant.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 db:add-missing-indices
sudo -u numbus-admin podman exec --user www-data nextcloud-server php occ maintenance:repair --include-expensive 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" ) 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[@]}")" CURRENT_APPS_SIGNATURE="$(echo "''${INSTALL_APPS_LIST[@]}" "''${REMOVE_APPS_LIST[@]}")"
APPS_SIGNATURE_FILE="/var/lib/numbus-server/${name}/installed_apps.signature" APPS_SIGNATURE_FILE="/var/lib/numbus-server/${name}/installed_apps.signature"