1
0
Fork 0
selfhostblocks/_disnix/keycloak/default.nix

36 lines
551 B
Nix
Raw Normal View History

{ customPkgs
, pkgs
, utils
}:
{ serviceName ? "Keycloak"
, subdomain ? "keycloak"
, database ?
{
name = subdomain;
username = "keycloak";
# TODO: use passwordFile
password = "keycloak";
}
}:
rec {
inherit subdomain;
inherit database;
db = customPkgs.mkPostgresDB {
name = "KeycloakPostgresDB";
database = database.name;
username = database.username;
# TODO: use passwordFile
password = database.password;
};
services = {
${db.name} = db;
};
distribute = on: {
${db.name} = on;
};
}