Fix zitadel config
This commit is contained in:
parent
1250683996
commit
ec51278987
@ -47,8 +47,7 @@
|
|||||||
name = "zitadel";
|
name = "zitadel";
|
||||||
ensureDBOwnership = true;
|
ensureDBOwnership = true;
|
||||||
ensureClauses = {
|
ensureClauses = {
|
||||||
createdb = true;
|
superuser = true;
|
||||||
createrole = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -61,7 +60,11 @@
|
|||||||
group = "zitadel";
|
group = "zitadel";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.zitadel.after = [ "postgresql.service" ];
|
systemd.services.zitadel = {
|
||||||
|
requires = [ "postgresql.service" ];
|
||||||
|
after = [ "postgresql.service" ];
|
||||||
|
};
|
||||||
|
|
||||||
services.zitadel = {
|
services.zitadel = {
|
||||||
enable = true;
|
enable = true;
|
||||||
masterKeyFile = config.age.secrets."files/services/zitadel/masterkey".path;
|
masterKeyFile = config.age.secrets."files/services/zitadel/masterkey".path;
|
||||||
@ -80,32 +83,34 @@
|
|||||||
SSL.Mode = "disable";
|
SSL.Mode = "disable";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
DefaultInstance = {
|
|
||||||
InstanceName = "Vimium";
|
|
||||||
Org = {
|
|
||||||
Name = "Vimium";
|
|
||||||
Human = {
|
|
||||||
UserName = "admin@vimium.com";
|
|
||||||
FirstName = "Vimium";
|
|
||||||
LastName = "Admin";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
DomainPolicy.UserLoginMustBeDomain = true;
|
|
||||||
};
|
|
||||||
ExternalDomain = "id.vimium.com";
|
ExternalDomain = "id.vimium.com";
|
||||||
ExternalPort = 443;
|
ExternalPort = 443;
|
||||||
ExternalSecure = true;
|
ExternalSecure = true;
|
||||||
|
Machine = {
|
||||||
|
Identification = {
|
||||||
|
Hostname.Enabled = true;
|
||||||
|
PrivateIp.Enabled = false;
|
||||||
|
Webhook.Enabled = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
Port = 8081;
|
Port = 8081;
|
||||||
WebAuthNName = "Vimium";
|
WebAuthNName = "Vimium";
|
||||||
};
|
};
|
||||||
steps.FirstInstance = {
|
steps.FirstInstance = {
|
||||||
InstanceName = "Vimium";
|
InstanceName = "Vimium";
|
||||||
|
Org.Name = "Vimium";
|
||||||
Org.Human = {
|
Org.Human = {
|
||||||
UserName = "jordan@vimium.com";
|
UserName = "jordan@vimium.com";
|
||||||
FirstName = "Jordan";
|
FirstName = "Jordan";
|
||||||
LastName = "Holt";
|
LastName = "Holt";
|
||||||
Email.Address = "jordan@vimium.com";
|
Email = {
|
||||||
|
Address = "jordan@vimium.com";
|
||||||
|
Verified = true;
|
||||||
|
};
|
||||||
|
Password = "Password1!";
|
||||||
|
PasswordChangeRequired = true;
|
||||||
};
|
};
|
||||||
|
LoginPolicy.AllowRegister = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -113,12 +118,9 @@
|
|||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${builtins.toString config.services.zitadel.settings.Port}";
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
grpc_pass grpc://localhost:${builtins.toString config.services.zitadel.settings.Port};
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
grpc_set_header Host $host:$server_port;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -17,6 +17,7 @@ in {
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
enableJIT = true;
|
||||||
initdbArgs = [
|
initdbArgs = [
|
||||||
"--allow-group-access"
|
"--allow-group-access"
|
||||||
"--encoding=UTF8"
|
"--encoding=UTF8"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user