Files
nixos-configuration/hosts/nidaros/keycloak.nix

28 lines
597 B
Nix
Raw Normal View History

2025-10-14 18:35:15 +00:00
{ config, common, ... }:
let
port = 8081;
domain = "iam.${common.domain}";
dbPassKey = "keycloak/database-pass";
in
{
services = {
keycloak = {
enable = true;
settings = {
hostname = "https://${domain}";
http-port = port;
http-enabled = true;
};
database = {
type = "postgresql";
createLocally = true;
port = config.services.postgresql.settings.port;
passwordFile = config.sops.secrets.${dbPassKey}.path;
};
initialAdminPassword = "changeme";
};
};
sops.secrets.${dbPassKey} = { };
}