mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-01-18 17:11:39 +01:00
keycloak: re-init
This commit is contained in:
parent
7bc9e06788
commit
afc0ea55be
4 changed files with 45 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
./modules/networks
|
||||
./modules/adguard
|
||||
./modules/backup
|
||||
./modules/keycloak
|
||||
./modules/cache
|
||||
./modules/matrix
|
||||
./modules/mautrix-telegram
|
||||
|
|
43
hosts/nuc/modules/keycloak/default.nix
Normal file
43
hosts/nuc/modules/keycloak/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
domain = "auth.${config.networking.domain}";
|
||||
in
|
||||
{
|
||||
age.secrets.keycloak = {
|
||||
file = ../../../../secrets/nuc/keycloak/db.age;
|
||||
};
|
||||
services.keycloak = {
|
||||
enable = true;
|
||||
settings = {
|
||||
http-port = 8084;
|
||||
https-port = 19000;
|
||||
hostname = domain;
|
||||
# proxy-headers = "forwarded";
|
||||
proxy = "edge";
|
||||
};
|
||||
database = {
|
||||
# host = "/var/run/postgresql/.s.PGSQL.5432";
|
||||
# useSSL = false;
|
||||
# createLocally = false;
|
||||
passwordFile = config.age.secrets.keycloak.path;
|
||||
};
|
||||
initialAdminPassword = "plschangeme";
|
||||
};
|
||||
# services.postgresql = {
|
||||
# enable = true;
|
||||
# ensureUsers = [
|
||||
# {
|
||||
# name = "keycloak";
|
||||
# ensureDBOwnership = true;
|
||||
# }
|
||||
# ];
|
||||
# ensureDatabases = [ "keycloak" ];
|
||||
# };
|
||||
services.nginx.virtualHosts."${domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.keycloak.settings.http-port}";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -20,6 +20,7 @@ in
|
|||
"secrets/nuc/matrix/sync.age".publicKeys = [ rouven nuc ];
|
||||
"secrets/nuc/mautrix-telegram/env.age".publicKeys = [ rouven nuc ];
|
||||
"secrets/nuc/vaultwarden.age".publicKeys = [ rouven nuc ];
|
||||
"secrets/nuc/keycloak/db.age".publicKeys = [ rouven nuc ];
|
||||
"secrets/nuc/cache.age".publicKeys = [ rouven nuc ];
|
||||
"secrets/nuc/borg/passphrase.age".publicKeys = [ rouven nuc ];
|
||||
"secrets/nuc/borg/key.age".publicKeys = [ rouven nuc ];
|
||||
|
|
BIN
secrets/nuc/keycloak/db.age
Normal file
BIN
secrets/nuc/keycloak/db.age
Normal file
Binary file not shown.
Loading…
Reference in a new issue