Updated clamAV configuration. Fixed nextcloud-quirk typo.
This commit is contained in:
+34
-25
@@ -1,34 +1,43 @@
|
|||||||
{ 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
|
||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ pkgs.clamav pkgs.curl ];
|
options.numbus.services.clamav = {
|
||||||
|
enable = mkEnableOption "ClamAV open-source anti-virus software";
|
||||||
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"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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 = {
|
scanner = {
|
||||||
OnAccessPrevention = true;
|
enable = true;
|
||||||
OnAccessIncludePath = "/mnt/data";
|
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;
|
|
||||||
}
|
}
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user