katzen-cafe/modules/keycloak.nix

34 lines
751 B
Nix
Raw Normal View History

2023-04-26 21:25:04 +00:00
{ pkgs, ... }:
{
services.keycloak = {
enable = true;
settings = {
2023-04-30 12:56:30 +00:00
http-port = 8080;
http-enabled = true;
2023-04-26 21:25:04 +00:00
proxy = "edge";
2023-04-30 12:56:30 +00:00
2023-04-26 21:25:04 +00:00
hostname = "auth.katzen.cafe";
2023-04-30 12:56:30 +00:00
hostname-port = "-1";
hostname-admin-url = "https://auth.katzen.cafe";
2023-04-26 23:48:20 +00:00
hostname-strict-backchannel = true;
2023-04-26 21:25:04 +00:00
};
2023-04-30 12:56:30 +00:00
#sslCertificateKey = "/var/lib/acme/auth.katzen.cafe/key.pem";
#sslCertificate = "/var/lib/acme/auth.katzen.cafe/cert.pem";
2023-04-26 21:25:04 +00:00
database = {
2023-04-26 23:48:20 +00:00
type = "postgresql";
createLocally = true;
username = "keycloak";
passwordFile = "/run/keys/keycloakDbPw";
2023-04-26 21:25:04 +00:00
};
};
2023-04-26 23:48:20 +00:00
deployment.keys."keycloakDbPw" = {
keyCommand = [ "cat" "/home/jade/keys-tmp/keycloak-db" ];
destDir = "/run/keys/";
};
2023-04-26 21:25:04 +00:00
}