stalwart: add stalwart user

This commit is contained in:
Bloxx12 2025-05-22 22:43:04 +02:00
commit feb0f86e95
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E

View file

@ -13,6 +13,15 @@
in {
options.modules.system.services.stalwart.enable = mkEnableOption "stalwart";
config = mkIf cfg.enable {
# create the stallwart user
users.users.stalwart = {
home = "/var/lib/stalwart-mail";
useDefaultShell = true;
group = "stalwart";
isSystemUser = true;
};
users.groups.stalwart = {};
services.stalwart-mail = {
enable = true;
package = pkgs.stalwart-mail;
@ -91,7 +100,7 @@ in {
};
};
store = {
"postgresql" = {
postgresql = {
# Specifies the database type, set to "postgresql" for PostgreSQL.
type = "postgresql";
@ -102,11 +111,15 @@ in {
port = "5432";
# Name of the database to connect to.
# TODO: add this to PostgreSQL.
database = "stalwart";
# The username used for authentication with the PostgreSQL server.
# TODO: add this to PostgreSQL.
user = "stalwart";
password = "";
# Enable TLS
tls.enable = true;
};