-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
nixcloud.email: a simple yet powerful abstraction for a basic mailser… #29366
nixcloud.email: a simple yet powerful abstraction for a basic mailser… #29366
Conversation
@qknight, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @bjornfor and @offlinehacker to be potential reviewers. |
8138154
to
7594b33
Compare
# - use reload instead of restart | ||
#acmePostRun = | ||
#'' | ||
# FIXME hier reicht ggf. reload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs translation.
…ver configuration on your root server
7594b33
to
d2c0513
Compare
👎 on adding vendored code, this seems to imply that the nixpkgs/NixOS maintainers are responsible for maintenance, I'd prefer keeping code like this in seperate repositories, you can always just import those open-source modules from your configuration e.g nixops repository |
I share the same opinion. I don't want to discourage your contribution. The module is nice and useful for people, but I think this is out of scope of nixpkgs. For the ease of deployment it is possible to add modules from external resources. Musnix does this for example. |
We had an discussion in IRC on how to load external modules and also other examples were provided: In nix 1.12 there will be
An alternative is this project https://github.com/xtruder/nix-profiles. |
@Mic92 @globin this abstraction makes mainly sense in nixpkgs as with the tests we can check if it is working after changes, thus less breakages when developers change things. this is the whole point of hydra and makes bug tracking much easier. currently |
I agree with @Mic92 and @globin. It makes more sense to setup a vendor repository and give some instructions on how to add your vendor repository for people that want to use the additions. I could see allowing something like this into nixpkgs resulting in similar PR's with lots of edge cases of how a system should be setup from the point of view of the vendor. The problem then becomes maintaining that mess of extra code. |
@disassembler this abstraction makes it so much easier for novice users to setup a mailserver with all there is required and this is really a complex problem. more advanced users can copy parts of this abstraction and create one of their own. it is really important for us to have this in nixpkgs and we are sure both sides will hugely benefit from this code as well as all the other email related things we already did and have in nixpkgs. |
@disassembler @Mic92 @globin i think the same is true for this abstraction. maybe we can rename the abstraction into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have mixed feelings about this PR. On one hand, it is clearly useful. On the other hand, I'd rather see the modules of the services this ties together improved to the point where having such an integration module is no longer necessary. It feels like this code is adding complexity to Nixpkgs rather than reducing it, i.e. changes to postfix etc. now have the potential to break the installation of users of this code in ways that the person making the change cannot easily foresee.
Anyhow, this is a difficult topic and I'm undecided about whether to merge this PR or not.
@qknight I'd be willing to pool efforts on an external module solution if this does not get merged. See https://github.com/r-raymond/nixos-mailserver |
Getting email right is extremely hard, and the solution will not be in improving the separate pieces as these were not designed as a whole but are scattered everywhere. As an accomplished user, I find having a reproducible integrated solution in NixOS that embodies all best practices would be an extremely valuable building block. I just got a mail from someone asking me literally today. Using a namespace other than services.email does makes sens, so that people can educate themselves of the risk of this being abandoned at some point - but it is open source, so anyone can pick it up. I'd love this to be part of the NixOS experience of users as soon as possible in the most easy shape and form, because this is such a basic need of everyone. Look forward as well to see more features added by @qknight and @r-raymond, and willing to betatest and contribute. |
I also think a mail server is hard to abstract away, our WIP mail server takes quite a different approach in some parts and I'm not sure very opinionated configs belong into nixpkgs. We have stuff like this for our monitoring, which fetches all configs from nixops But we might want to establish some best practices on how to easily integrate this kind of extra modules into your own config. We are currently doing this, but needs updating the hash on change, but by that makes sure that the modules are compatible to the deployment always:
|
@globin that is interesting, where is the source code for your mailserver abstraction? i'd like to have a look at that as well. |
@qknight not ready yet, but will ping you when we open source it |
since there is no futher discussion and more devs dislike to put a generalized email abstraction into nixpkgs we will create our own overlay as globin suggested. thanks for the discussion. |
@r-raymond we will be releasing this in |
@qknight could you link to the repo when it's ready? |
@globin using a third party repository with another workflow would be to use a third party repository which is importet and a nixpkgs branch with patches in it. but i can't imagine someone would want to use that since the overhead in debugging is overwhelming. that is also the reason why we as the the nixos community merged @eqyiel we are about to release our email source code among a few other cool things but we have to find a 'easy to use' solution for the problem stated above first. |
what is your oppinion on this, should we fork nixpkgs or use |
@qknight The approach I have taken so far is too use the stock implementations of nixpkgs, and if necessary work around things by creating systemd modules to handle other stuff (e.g. create dkim certs etc). Is your solution heavily relying on modifying nixpkgs? |
@r-raymond we started originally we modified:
from which only a patch to do you see a way around this besides forking nixpkgs and maintaining many patches on top of nixpkgs? |
@qknight Sorry for answering so late, I'm kind of swamped right now. Hopefully I'll find more time in the beginning of the next year. Anyway, I don't see a way around this if you insist on modifying the services, but I'm not sure I'm up for maintaining a fork of I'd vote for getting as many patches as possible to be merged by |
@r-raymond we are now using lib.disabledModules and aszlig wrote a feature for us so we can hash a nixpkgs module and keep track of that hash so we can see if upstream changes happened. that said, we don't aim on getting nixcloud.email into nixpkgs anymore. that is also true for a bunch of other extensions we are about to release soon. oh and we don't have to use a nixpkgs fork but instead are using the |
@r-raymond |
Awesome, I'll take a look as soon as I find some time. Any plans on a merger?
…On 11/19, Joachim Schiele wrote:
@r-raymond `nixcloud.email` is now finally released, have a look at https://github.com/nixcloud/nixcloud-webservices and https://lastlog.de/blog/posts/nixcloud-webservices.html
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#29366 (comment)
|
Motivation for this change
at nixcloud we refactored postfix, dkim, spamassassin, dovecot2 into a simple abstraction called
nixcloud.email
and also maintain that abstraction.WARNING: we introduce a new namespace:
nixcloud.email
instead ofservices.email
since we take responsibility for the changes. we are working on automated testing for this infrastructure as well and will upload this until the end of the year. this probably needs some discussion.we are using this abstraction on lastlog.de already and it works fine except:
we have a bunch of nice features:
upcoming features:
WARNING
please do not merge this until these two PRs have been merged:
we already transformed postfix and spamassassin, see this PR:
other mission critical todos:
nixos-rebuild
#29466example configuration
thanks
many thanks to @uwap and @aszlig for their help with these patches!
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)