katzen-cafe/modules/keycloak.nix
2023-07-30 18:19:44 +02:00

36 lines
823 B
Nix

{ pkgs, ... }:
{
services.keycloak = {
enable = true;
settings = {
http-port = 8080;
http-host = "127.0.0.3";
http-enabled = true;
https-port = 8443;
proxy = "edge";
hostname = "auth.katzen.cafe";
hostname-port = "-1";
hostname-admin-url = "https://auth.katzen.cafe";
# hostname-strict-backchannel = true;
};
#sslCertificateKey = "/var/lib/acme/auth.katzen.cafe/key.pem";
#sslCertificate = "/var/lib/acme/auth.katzen.cafe/cert.pem";
database = {
type = "postgresql";
createLocally = false;
username = "keycloak";
passwordFile = "/var/lib/secrets/keycloakDbPw";
};
};
deployment.keys."keycloakDbPw" = {
keyCommand = [ "cat" "/home/jade/keys-tmp/keycloak-db" ];
destDir = "/var/lib/secrets";
};
}