2023-04-26 23:25:04 +02:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
services.keycloak = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings = {
|
2023-04-30 14:56:30 +02:00
|
|
|
http-port = 8080;
|
2023-07-30 18:19:44 +02:00
|
|
|
http-host = "127.0.0.3";
|
2023-04-30 14:56:30 +02:00
|
|
|
http-enabled = true;
|
2023-07-30 16:24:46 +02:00
|
|
|
https-port = 8443;
|
2023-04-30 14:56:30 +02:00
|
|
|
|
2023-04-26 23:25:04 +02:00
|
|
|
proxy = "edge";
|
2023-04-30 14:56:30 +02:00
|
|
|
|
2023-04-26 23:25:04 +02:00
|
|
|
hostname = "auth.katzen.cafe";
|
2023-04-30 14:56:30 +02:00
|
|
|
hostname-port = "-1";
|
|
|
|
hostname-admin-url = "https://auth.katzen.cafe";
|
2023-07-30 16:24:46 +02:00
|
|
|
# hostname-strict-backchannel = true;
|
2023-04-26 23:25:04 +02:00
|
|
|
};
|
|
|
|
|
2023-04-30 14:56:30 +02:00
|
|
|
#sslCertificateKey = "/var/lib/acme/auth.katzen.cafe/key.pem";
|
|
|
|
#sslCertificate = "/var/lib/acme/auth.katzen.cafe/cert.pem";
|
|
|
|
|
2023-04-26 23:25:04 +02:00
|
|
|
database = {
|
2023-04-27 01:48:20 +02:00
|
|
|
type = "postgresql";
|
2023-05-21 12:52:04 +02:00
|
|
|
createLocally = false;
|
2023-04-27 01:48:20 +02:00
|
|
|
|
|
|
|
username = "keycloak";
|
2023-05-21 12:52:04 +02:00
|
|
|
passwordFile = "/var/lib/secrets/keycloakDbPw";
|
2023-04-26 23:25:04 +02:00
|
|
|
};
|
|
|
|
};
|
2023-04-27 01:48:20 +02:00
|
|
|
deployment.keys."keycloakDbPw" = {
|
2023-08-06 20:17:41 +02:00
|
|
|
keyCommand = [ "pass" "keycloak/db-pass" ];
|
2023-05-21 12:52:04 +02:00
|
|
|
destDir = "/var/lib/secrets";
|
2023-04-27 01:48:20 +02:00
|
|
|
};
|
2023-04-26 23:25:04 +02:00
|
|
|
}
|