NixOS-Config/nixos/queen/webmail.nix

35 lines
909 B
Nix
Raw Normal View History

2023-12-17 17:20:19 +01:00
{
config,
pkgs,
lib,
...
2023-12-17 22:29:36 +01:00
}: {
2023-12-21 23:34:45 +01:00
# TODO: Figure out how to create packages for some plugins for roundcube!
# https://packagist.org/search/?query=roundcube
# https://discourse.nixos.org/t/roundcube-with-plugins/28292/7
2023-12-17 17:20:19 +01:00
services.roundcube = {
enable = true;
2023-12-21 23:34:45 +01:00
package = pkgs.roundcube.withPlugins (
plugins: [
plugins.contextmenu
plugins.carddav
plugins.custom_from
plugins.persistent_login
plugins.thunderbird_labels
]
);
2023-12-17 17:20:19 +01:00
# this is the url of the vhost, not necessarily the same as the fqdn of
# the mailserver
2023-12-21 21:15:44 +01:00
hostName = "webmail.lillianviolet.dev";
2023-12-17 17:20:19 +01:00
extraConfig = ''
# starttls needed for authentication, so the fqdn required to match
# the certificate
$config['smtp_server'] = "tls://${config.mailserver.fqdn}";
$config['smtp_user'] = "%u";
$config['smtp_pass'] = "%p";
'';
};
}