diff --git a/modules/services/stalwart/module.nix b/modules/services/stalwart/module.nix index 903efec..efc38e3 100644 --- a/modules/services/stalwart/module.nix +++ b/modules/services/stalwart/module.nix @@ -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; };