Platforn 22.05 #67

Merged
max merged 18 commits from platforn-22.05 into master 2022-05-31 10:23:41 +03:00
Showing only changes of commit e223885972 - Show all commits

View file

@ -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";
};
}; };
}; };
} }