katzen-cafe/modules/keycloak.nix

34 lines
751 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;
http-enabled = true;
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-04-27 01:48:20 +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 = true;
username = "keycloak";
passwordFile = "/run/keys/keycloakDbPw";
2023-04-26 23:25:04 +02:00
};
};
2023-04-27 01:48:20 +02:00
deployment.keys."keycloakDbPw" = {
keyCommand = [ "cat" "/home/jade/keys-tmp/keycloak-db" ];
destDir = "/run/keys/";
};
2023-04-26 23:25:04 +02:00
}