diff --git a/hosts/hackens-org/wiki.nix b/hosts/hackens-org/wiki.nix index 9f10bd3..71d67b8 100644 --- a/hosts/hackens-org/wiki.nix +++ b/hosts/hackens-org/wiki.nix @@ -37,6 +37,10 @@ in $conf['tpl']['bootstrap3']['showAddNewPage'] = 'logged'; $conf['tpl']['bootstrap3']['fluidContainer'] = 0; $conf['htmlmail'] = 0; // On envoie les mails en plain text + $conf['authtype'] = 'oauth'; + $conf['plugin']['oauthkeycloak']['key'] = 'wiki'; + $conf['plugin']['oauthkeycloak']['secret'] = ''; + $conf['plugin']['oauthkeycloak']['openidurl'] = 'https://auth.rz.ens.wtf/auth/realms/hackENS/.well-known/openid-configuration/'; ''; pluginsConfig = '' @@ -45,6 +49,7 @@ in $plugins['authpgsql'] = 0; $plugins['authpdo'] = 0; $plugins['authldap'] = 0; + $plugins['oauthkeycloak'] = 1; ''; disableActions = "register"; @@ -118,6 +123,36 @@ in cp -R * $out/ ''; }) + (pkgs.stdenv.mkDerivation { + name = "oauth"; + # Download the theme from the dokuwiki site + src = pkgs.fetchFromGitHub { + owner = "cosmocode"; + repo = "dokuwiki-plugin-oauth"; + rev = "2022-01-13"; + sha256 = "ruaw8MqSMgopULD7vxed44nbowjVc1e4H0Q7JEL9pD0="; + }; + # Installing simply means copying all files to the output directory + installPhase = '' + mkdir -p $out + cp -R * $out/ + ''; + }) + (pkgs.stdenv.mkDerivation { + name = "oauthkeycloak"; + # Download the theme from the dokuwiki site + src = pkgs.fetchFromGitHub { + owner = "YoitoFes"; + repo = "dokuwiki-plugin-oauthkeycloak"; + rev = "2022-12-23"; + sha256 = "jV4CCVJ+4vbWE52ocsJnHR5oIM5ZM/5aYub6wxkVado="; + }; + # Installing simply means copying all files to the output directory + installPhase = '' + mkdir -p $out + cp -R * $out/ + ''; + }) ]; }; # On veut php-xml