katzen-cafe/modules/keycloak.nix

36 lines
809 B
Nix
Raw Normal View History

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";
createLocally = false;
2023-04-27 01:48:20 +02:00
username = "keycloak";
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" ];
destDir = "/var/lib/secrets";
2023-04-27 01:48:20 +02:00
};
2023-04-26 23:25:04 +02:00
}