stalwart: add stalwart user
This commit is contained in:
parent
4e4795cc88
commit
feb0f86e95
1 changed files with 14 additions and 1 deletions
|
@ -13,6 +13,15 @@
|
||||||
in {
|
in {
|
||||||
options.modules.system.services.stalwart.enable = mkEnableOption "stalwart";
|
options.modules.system.services.stalwart.enable = mkEnableOption "stalwart";
|
||||||
config = mkIf cfg.enable {
|
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 = {
|
services.stalwart-mail = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.stalwart-mail;
|
package = pkgs.stalwart-mail;
|
||||||
|
@ -91,7 +100,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
store = {
|
store = {
|
||||||
"postgresql" = {
|
postgresql = {
|
||||||
# Specifies the database type, set to "postgresql" for PostgreSQL.
|
# Specifies the database type, set to "postgresql" for PostgreSQL.
|
||||||
type = "postgresql";
|
type = "postgresql";
|
||||||
|
|
||||||
|
@ -102,11 +111,15 @@ in {
|
||||||
port = "5432";
|
port = "5432";
|
||||||
|
|
||||||
# Name of the database to connect to.
|
# Name of the database to connect to.
|
||||||
|
# TODO: add this to PostgreSQL.
|
||||||
database = "stalwart";
|
database = "stalwart";
|
||||||
|
|
||||||
# The username used for authentication with the PostgreSQL server.
|
# The username used for authentication with the PostgreSQL server.
|
||||||
|
# TODO: add this to PostgreSQL.
|
||||||
user = "stalwart";
|
user = "stalwart";
|
||||||
|
|
||||||
|
password = "";
|
||||||
|
|
||||||
# Enable TLS
|
# Enable TLS
|
||||||
tls.enable = true;
|
tls.enable = true;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue