-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Support setting defaults for security.acme.certs #138478
Comments
Yeah, this is quite an interesting idea. Setting "defaults" or common configuration in that way would simplify configuration (even if you could technically do this already with some I don't think it would be too much work to do either due to the way the module works. We already do this with I'll put it on my to-do list for next time I do an update to the module, but if you want to try it yourself by all means have a go! Looking at the logic around |
This turned out to be quite the handful to implement! Firstly, it took quite some discussion to figure out where best to place these two levels of defaults were. We settled on
Additionally, implementing the example you gave in this ticket of specifying dnsProvider defaults for httpd/nginx-generated certs was a bit tricky. |
Resolved (and documented!) in #147784 |
Issue description
The ACME support in https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/security/acme.nix is nicely integrated with other modules; for example, services.httpd will automatically configure security.acme.certs based on the other configuration in services.httpd: https://github.com/NixOS/nixpkgs/blob/nixos-21.05/nixos/modules/services/web-servers/apache-httpd/default.nix#L672
However, if there's anything nonstandard about how certificates need to be acquired (for example, if one is using DNS-based authentication and needs to set security.acme.certs..{dnsProvider,credentialsFile}), this integration won't work and one is forced to do things more manually.
If we supported configuring defaults at the security.acme level (e.g. security.acme.{dnsProvider,credentialsFile}) the user could customize the process of acquiring certificates, while still getting automated integration with other services.
I'm not sure exactly what form this should take, hence why I'm filing this issue instead of just doing it and submitting a PR, but happy to do it if someone can give me a few pointers to other services that have this kind of defaulting structure.
The text was updated successfully, but these errors were encountered: