Theme for Keycloak

I’m trying to add a custom theme to my Keycloak configuration but I’m a bit lost.
Starting from the nix documentation and the keycloak documentation, I created a folder that I would just add in the theme directory if I wasn’t using nix.

But how do I call it as a package ?
I found this topic for a custom gtk3 theme and followed the recommandations to create a local set of packages that would call a keycloak-theme.nix

{pkgs, ...}: let
  callPackage = pkgs.callPackage;
in {
  nixpkgs.overlays = [(final: prev: {
    mypackages = {
      my-keycloak-theme = callPackage ./my-keycloak-theme.nix {};
imports =
	[ # Include the results of the hardware scan.

	environment.systemPackages = with pkgs; [

services.keycloak.theme = mypackages  <-- I used mypackages since the doc says that this attribute is of type "set of package", should I use my theme package directly ?

But what should I write in the my-keycloak-theme.nix file now ? I have no idea where to begin. Did I just miss the relevant doc ?

Thanks !

Well, I wasn’t far but it took some times and I definitely leveled up in NixOS.
I updated the nixos wiki with a guide to create a custom theme

1 Like