Platforn 22.05 #67
1 changed files with 8 additions and 12 deletions
|
@ -17,29 +17,25 @@ in
|
||||||
mode = "0400";
|
mode = "0400";
|
||||||
};
|
};
|
||||||
services.nginx.virtualHosts = {
|
services.nginx.virtualHosts = {
|
||||||
"${login}" = lib.recursiveUpdate (vhosts.proxy "http://${cfg.bindAddress}:${config.portsStr.keycloak}") {
|
"${login}" = lib.recursiveUpdate (vhosts.proxy "http://${cfg.settings.http-host}:${config.portsStr.keycloak}") {
|
||||||
locations."= /".return = "302 /auth/realms/master/account/";
|
locations."= /".return = "302 /auth/realms/master/account/";
|
||||||
};
|
};
|
||||||
"account.${domain}" = vhosts.redirect "https://${login}/auth/realms/master/account/";
|
"account.${domain}" = vhosts.redirect "https://${login}/auth/realms/master/account/";
|
||||||
};
|
};
|
||||||
services.keycloak = {
|
services.keycloak = {
|
||||||
enable = true;
|
enable = true;
|
||||||
frontendUrl = "https://${login}/auth";
|
|
||||||
bindAddress = "127.0.0.1";
|
|
||||||
httpPort = config.portsStr.keycloak;
|
|
||||||
database = {
|
database = {
|
||||||
createLocally = true;
|
createLocally = true;
|
||||||
type = "postgresql";
|
type = "postgresql";
|
||||||
passwordFile = config.age.secrets.keycloak-dbpass.path;
|
passwordFile = config.age.secrets.keycloak-dbpass.path;
|
||||||
};
|
};
|
||||||
extraConfig = {
|
settings = {
|
||||||
"subsystem=undertow" = {
|
http-host = "127.0.0.1";
|
||||||
"server=default-server" = {
|
http-port = config.ports.keycloak;
|
||||||
"http-listener=default" = {
|
hostname = login;
|
||||||
proxy-address-forwarding = true;
|
proxy = "edge";
|
||||||
};
|
# for backcompat, TODO: remove
|
||||||
};
|
http-relative-path = "/auth";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue