2022-08-16 15:40:59 +02:00
|
|
|
{pkgs, config, lib, ...}: {
|
2022-08-16 15:18:28 +02:00
|
|
|
|
2022-08-16 15:42:10 +02:00
|
|
|
sops.secrets.postgres_keycloak.owner = config.systemd.services.postgres_keycloak.serviceConfig.User;
|
2022-08-16 15:18:28 +02:00
|
|
|
|
|
|
|
services = {
|
|
|
|
keycloak = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
hostname = "keycloak.durian.tassilo-tanneberger.de";
|
|
|
|
};
|
|
|
|
|
|
|
|
database = {
|
|
|
|
username = "keycloak";
|
|
|
|
type = "postgresql";
|
2022-08-16 15:40:59 +02:00
|
|
|
passwordFile = config.sops.secrets.postgres_keycloak.path;
|
2022-08-16 15:18:28 +02:00
|
|
|
name = "keycloak";
|
|
|
|
host = "localhost";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
postgresql = {
|
|
|
|
enable = true;
|
|
|
|
ensureUsers = [
|
|
|
|
{
|
|
|
|
name = "keycloak";
|
|
|
|
ensurePermissions = {
|
|
|
|
"DATABASE keycloak" = "ALL PRIVILEGES";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
ensureDatabases = [ "keycloak" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|