dump
All checks were successful
Hello World / test (push) Successful in 12s

This commit is contained in:
plasmagoat 2025-07-05 11:12:20 +02:00
parent 4ed9ba0d24
commit a90630ecb6
98 changed files with 2063 additions and 729 deletions

View file

@ -0,0 +1,15 @@
{stdenv}:
stdenv.mkDerivation rec {
name = "keycloak_custom_theme";
version = "1.0";
src = ./custom_theme;
nativeBuildInputs = [];
buildInputs = [];
installPhase = ''
mkdir -p $out
cp -a login $out
'';
}

View file

@ -0,0 +1,4 @@
body {
background: red;
color: blue;
}

View file

@ -0,0 +1,3 @@
parent=base
import=common/keycloak
styles=css/custom.css

View file

@ -0,0 +1,11 @@
{pkgs, ...}: let
callPackage = pkgs.callPackage;
in {
nixpkgs.overlays = [
(final: prev: {
custom_keycloak_themes = {
custom = callPackage ./custom_theme.nix {};
};
})
];
}

View file

@ -0,0 +1,14 @@
{
config,
pkgs,
modulesPath,
lib,
...
}: {
imports = [
../../templates/base.nix
./networking.nix
./sops.nix
./keycloak.nix
];
}

View file

@ -0,0 +1,31 @@
{
config,
pkgs,
...
}: {
services.postgresql.enable = true;
services.keycloak = {
enable = true;
initialAdminPassword = "password";
database = {
type = "postgresql";
createLocally = true;
username = "keycloak";
passwordFile = config.sops.secrets.keycloak_psql_pass.path;
};
settings = {
hostname = "keycloak.procopius.dk";
# hostname-admin = "http://keycloak.lab:8080";
# hostname-strict = false;
# hostname-backchannel-dynamic = true;
http-enabled = true;
http-port = 8080;
proxy-headers = "xforwarded";
};
};
networking.firewall.allowedTCPPorts = [8080];
}

View file

@ -0,0 +1,8 @@
{
config,
lib,
pkgs,
...
}: {
networking.hostName = "keycloak";
}

View file

@ -0,0 +1,12 @@
{...}: let
keycloakSops = ../../secrets/keycloak/secrets.yml;
in {
sops.secrets.keycloak_psql_pass = {
sopsFile = keycloakSops;
mode = "0440";
};
sops.secrets.keycloak_admin_pass = {
sopsFile = keycloakSops;
mode = "0440";
};
}