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

nixos/dovecot: Improve mailboxes type #95722

Merged
merged 1 commit into from Aug 21, 2020

Conversation

infinisil
Copy link
Member

Motivation for this change

The previous use of types.either disallowed assigning a list at one point and an attrset an another. This fixes this plus some other improvements like:

  • Only throwing the deprecation warning once and mentioning the release notes for more info
  • Have config.services.dovecot2.mailboxes be an attrset instead of a list, by not using apply

I couldn't easily keep the informative name assignment error, so I removed that in favor of name being readOnly (meaning it can only be assigned once, which is already done in the module itself).

Ping @Ma27 and @nlewo from the PR that introduced mailboxes as attrsets (nice!) #89486

Things done

Tested with https://gitlab.com/simple-nixos-mailserver/nixos-mailserver (which uses a list to assign mailboxes) and some custom mailboxes in my own config (which uses an attrset).

The previous use of types.either disallowed assigning a list at one
point and an attrset an another.
@infinisil
Copy link
Member Author

Just noticed that this can be simplified a bit, pushed that now (and tested again it works for my setup).

@infinisil infinisil merged commit bf77741 into NixOS:master Aug 21, 2020
@infinisil infinisil deleted the dovecot-mailboxes-improved branch August 21, 2020 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants