add email config to zitadel
This commit is contained in:
parent
1e3ee88bbe
commit
4e51ee9d2f
1 changed files with 33 additions and 1 deletions
|
|
@ -71,7 +71,8 @@ in
|
||||||
share = false;
|
share = false;
|
||||||
|
|
||||||
files.masterKey = { deploy = true; secret = true; owner = "zitadel"; group = "zitadel"; mode = "0400"; };
|
files.masterKey = { deploy = true; secret = true; owner = "zitadel"; group = "zitadel"; mode = "0400"; };
|
||||||
files.initialAdminPassword = { deploy = false; secret = false; };
|
files.initialAdminPassword = { deploy = false; secret = true; };
|
||||||
|
files.emailPassword = { deploy = false; secret = true; };
|
||||||
|
|
||||||
runtimeInputs = with pkgs; [ pwgen ];
|
runtimeInputs = with pkgs; [ pwgen ];
|
||||||
|
|
||||||
|
|
@ -81,13 +82,18 @@ in
|
||||||
# https://zitadel.com/docs/self-hosting/manage/configure#masterkey
|
# https://zitadel.com/docs/self-hosting/manage/configure#masterkey
|
||||||
# The master key has to be 32 bytes
|
# The master key has to be 32 bytes
|
||||||
head -c 32 /dev/urandom > "$out/masterKey"
|
head -c 32 /dev/urandom > "$out/masterKey"
|
||||||
|
|
||||||
|
touch $out/emailPassword
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.zitadel = {
|
services.zitadel = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
openFirewall = true;
|
||||||
|
|
||||||
masterKeyFile = config.clan.core.vars.generators.zitadel.files.masterKey.path;
|
masterKeyFile = config.clan.core.vars.generators.zitadel.files.masterKey.path;
|
||||||
|
tlsMode = "external";
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
Port = 9092;
|
Port = 9092;
|
||||||
|
|
@ -105,6 +111,32 @@ in
|
||||||
SecretHasher.Hasher.Algorithm = "argon2id";
|
SecretHasher.Hasher.Algorithm = "argon2id";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DefaultInstance = {
|
||||||
|
PasswordComplexityPolicy = {
|
||||||
|
MinLength = 20;
|
||||||
|
HasLowercase = false;
|
||||||
|
HasUppercase = false;
|
||||||
|
HasNumber = false;
|
||||||
|
HasSymbol = false;
|
||||||
|
};
|
||||||
|
LoginPolicy = {
|
||||||
|
AllowRegister = false;
|
||||||
|
ForceMFA = true;
|
||||||
|
};
|
||||||
|
LockoutPolicy = {
|
||||||
|
MaxPasswordAttempts = 5;
|
||||||
|
MaxOTPAttempts = 10;
|
||||||
|
};
|
||||||
|
SMTPConfiguration = {
|
||||||
|
SMTP = {
|
||||||
|
Host = "black-mail.nl:587";
|
||||||
|
User = "chris@kruining.eu";
|
||||||
|
Password = config.clan.core.vars.generators.zitadel.files.masterKey.value;
|
||||||
|
};
|
||||||
|
FromName = "Amarth Zitadel";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
Database.postgres = {
|
Database.postgres = {
|
||||||
Host = "localhost";
|
Host = "localhost";
|
||||||
# Zitadel will report error if port is not set
|
# Zitadel will report error if port is not set
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue