bekkalokk: setup keycloak

This commit is contained in:
2023-05-07 00:34:42 +02:00
parent 0e75e0a5b9
commit dcbe6871da
3 changed files with 29 additions and 2 deletions

View File

@@ -5,6 +5,8 @@
../../base.nix
./services/keycloak.nix
# TODO: set up authentication for the following:
# ./services/website/website.nix
# ./services/website/nginx.nix

View File

@@ -0,0 +1,24 @@
{ pkgs, config, values, ... }:
{
sops.secrets."keys/postgres/keycloak" = {
owner = "keycloak";
group = "keycloak";
restartUnits = [ "keycloak.service" ];
};
services.keycloak = {
enable = true;
settings = {
hostname = "auth.pvv.ntnu.no";
# hostname-strict-backchannel = true;
};
database = {
host = values.hosts.bicep.ipv4;
createLocally = false;
passwordFile = config.sops.secrets."keys/postgres/keycloak".path;
caCert = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
};
};
}