Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clamav module: make services.clamav.daemon.enable actually work #30870

Merged
merged 1 commit into from Nov 28, 2017

Conversation

Ekleog
Copy link
Member

@Ekleog Ekleog commented Oct 27, 2017

Turning services.clamav.daemon.enable = true without updater.enable also to true had no effect. This PR fixes this and replaces some mkIf's with optionalAttrs.

The issue seems to be that mkIf cfg.updater.enable or cfg.daemon.enable { ... } was parsed as mkIf (cfg.updater.enable or cfg.daemon.enable) { ... } (or binds stronger than function application), which then was always equivalent to mkIf cfg.updater.enable { ... }, as the option was always defined, be it with its default value or with its user-defined value.

Thanks @rycee for your help in understanding how it was actually able to parse and execute semi-correctly before this change! (I was convinced the or was nixpkgs' lib.or, before that)

@joachifm joachifm requested a review from fpletz October 29, 2017 09:53
@garbas garbas merged commit 652842d into NixOS:master Nov 28, 2017
@garbas
Copy link
Member

garbas commented Nov 28, 2017

@Ekleog tnx!

@Ekleog
Copy link
Member Author

Ekleog commented Nov 28, 2017

A pleasure :)

@Ekleog Ekleog deleted the clamav-cleanup branch November 28, 2017 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants