Keycloak: Difference between revisions

Onny (talk | contribs)
Importing realms
m Reword note about 25.05
 
(3 intermediate revisions by 2 users not shown)
Line 20: Line 20:


=== Importing realms ===
=== Importing realms ===
{{Note|The module is not yet part of the latest NixOS stable release and will be available with version 24.11.}}Using the realmFiles option, it is possible provision a realm from a JSON file or previous JSON export.<syntaxhighlight lang="nix">
{{Note|This module requires NixOS 25.05}}Using the realmFiles option, it is possible provision a realm from a JSON file or previous JSON export.<syntaxhighlight lang="nix">
{ ... }: let
{ ... }: let


Line 47: Line 47:


   services.keycloak = {
   services.keycloak = {
     realmFiles.OIDCDemo = builtins.toJSON realm;
     realmFiles = [
      (pkgs.writeText "OIDCDemo.json" (builtins.toJSON realm))
    ];
   };
   };