katzen-cafe/modules/keycloak.nix
2023-04-30 14:56:30 +02:00

34 lines
751 B
Nix

{ pkgs, ... }:
{
services.keycloak = {
enable = true;
settings = {
http-port = 8080;
http-enabled = true;
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 = true;
username = "keycloak";
passwordFile = "/run/keys/keycloakDbPw";
};
};
deployment.keys."keycloakDbPw" = {
keyCommand = [ "cat" "/home/jade/keys-tmp/keycloak-db" ];
destDir = "/run/keys/";
};
}