Hello,
I started experimenting with NixOS and I really like it. Unfortunately, I ran into a problem with clamav. I included the clamav service in my configuration.nix:
services = {
clamav = {
daemon.enable = true;
updater.enable = true;
};
};
After calling “nixos-rebuild switch” everything worked fine. However, on reboot I get the following error:
[...]
Dec 06 11:04:17 nixos kernel: NET: Registered protocol family 17
Dec 06 11:04:17 nixos wpa_supplicant[1067]: dbus: fill_dict_with_properties dbus_interface=fi.w1.wpa_supplicant1.Interface.P2PDevice dbus_property=P2PDeviceConfig getter failed
Dec 06 11:04:19 nixos systemd[1]: systemd-rfkill.service: Deactivated successfully.
Dec 06 11:04:21 nixos freshclam[905]: Trying to retrieve CVD header from https://database.clamav.net/daily.cvd
Dec 06 11:04:21 nixos freshclam[905]: WARNING: remote_cvdhead: Download failed (6) WARNING: Message: Couldn't resolve host name
Dec 06 11:04:21 nixos freshclam[905]: WARNING: Failed to get daily database version information from server: https://database.clamav.net
Dec 06 11:04:21 nixos freshclam[905]: ERROR: check_for_new_database_version: Failed to find daily database using server https://database.clamav.net.
Dec 06 11:04:21 nixos freshclam[905]: Trying again in 5 secs...
Dec 06 11:04:22 nixos dhcpcd[881]: wlp2s0: new hardware address: xx:xx:xx:xx:xx:xx
Dec 06 11:04:26 nixos freshclam[905]: Trying to retrieve CVD header from https://database.clamav.net/daily.cvd
Dec 06 11:04:26 nixos freshclam[905]: ERROR: remote_cvdhead: Download failed (6) ERROR: Message: Couldn't resolve host name
Dec 06 11:04:26 nixos freshclam[905]: WARNING: Failed to get daily database version information from server: https://database.clamav.net
Dec 06 11:04:26 nixos freshclam[905]: ERROR: check_for_new_database_version: Failed to find daily database using server https://database.clamav.net.
Dec 06 11:04:26 nixos freshclam[905]: Giving up on https://database.clamav.net...
Dec 06 11:04:26 nixos freshclam[905]: ERROR: Update failed for database: daily
Dec 06 11:04:26 nixos freshclam[905]: ERROR: Database update process failed: HTTP GET failed
Dec 06 11:04:26 nixos freshclam[905]: ERROR: Update failed.
Dec 06 11:04:26 nixos systemd[1]: clamav-freshclam.service: Main process exited, code=exited, status=11/n/a
Dec 06 11:04:26 nixos systemd[1]: clamav-freshclam.service: Failed with result 'exit-code'.
Dec 06 11:04:26 nixos systemd[1]: Failed to start ClamAV virus database updater (freshclam).
Dec 06 11:04:26 nixos systemd[1]: Dependency failed for ClamAV daemon (clamd).
Dec 06 11:04:26 nixos systemd[1]: clamav-daemon.service: Job clamav-daemon.service/start failed with result 'dependency'.
Dec 06 11:04:26 nixos systemd[1]: clamav-freshclam.service: Consumed 40ms CPU time, received 0B IP traffic, sent 158B IP traffic.
Dec 06 11:04:26 nixos systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
Dec 06 11:04:27 nixos wpa_supplicant[1067]: wlp2s0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='xxxxxx' freq=5180 MHz)
Dec 06 11:04:37 nixos wpa_supplicant[1067]: wlp2s0: Authentication with xx:xx:xx:xx:xx:xx timed out.
Dec 06 11:04:37 nixos wpa_supplicant[1067]: wlp2s0: CTRL-EVENT-DISCONNECTED bssid=3c:37:12:44:ef:b3 reason=3 locally_generated=1
Dec 06 11:04:41 nixos wpa_supplicant[1067]: wlp2s0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='xxxxxxx' freq=5500 MHz)
Dec 06 11:04:46 nixos dhcpcd[881]: timed out
Dec 06 11:04:46 nixos dhcpcd[881]: timed out
Dec 06 11:04:46 nixos dhcpcd[881]: forked to background, child pid 1073
Dec 06 11:04:46 nixos systemd[1]: Started DHCP Client.
Dec 06 11:04:46 nixos NetworkManager[1059]: <warn> [1638785086.8930] device (wlp2s0): Activation: (wifi) association took too long
Dec 06 11:04:46 nixos NetworkManager[1059]: <warn> [1638785086.8934] device (wlp2s0): Activation: (wifi) asking for new secrets
Dec 06 11:04:46 nixos wpa_supplicant[1067]: wlp2s0: CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=3 locally_generated=1
Dec 06 11:04:47 nixos systemd[1]: systemd-hostnamed.service: Deactivated successfully.
Dec 06 11:04:51 nixos wpa_supplicant[1067]: wlp2s0: Trying to associate with xx:xx:xx:xx:xx:xx (SSID='xxxxxx' freq=5500 MHz)
Dec 06 11:04:51 nixos wpa_supplicant[1067]: wlp2s0: Associated with xx:xx:xx:xx:xx:xx
Dec 06 11:04:51 nixos wpa_supplicant[1067]: wlp2s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Dec 06 11:04:51 nixos wpa_supplicant[1067]: wlp2s0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=DE
Dec 06 11:04:51 nixos wpa_supplicant[1067]: wlp2s0: WPA: Key negotiation completed with xx:xx:xx:xx:xx:xx [PTK=CCMP GTK=CCMP]
Dec 06 11:04:51 nixos wpa_supplicant[1067]: wlp2s0: CTRL-EVENT-CONNECTED - Connection to xx:xx:xx:xx:xx:xx completed [id=0 id_str=]
Dec 06 11:04:51 nixos wpa_supplicant[1067]: bgscan simple: Failed to enable signal strength monitoring
[...]
It seems that the service cannot be started because the network is not yet up. Thereafter it is not retried to start the service.
Is there any means to delay the service start or to try again later?
Thank you in advance!