2023-01-13 13:27:38 +01:00
|
|
|
{ config, pkgs, lib, ... }: {
|
2023-01-14 15:45:32 +01:00
|
|
|
|
2023-01-13 13:27:38 +01:00
|
|
|
services.nginx.virtualHosts."new.hackens.org" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.dokuwiki.sites."new.hackens.org" = {
|
2023-01-14 15:45:32 +01:00
|
|
|
enable = false; # true;
|
2023-01-13 13:27:38 +01:00
|
|
|
settings = {
|
|
|
|
template = "bootstrap3";
|
|
|
|
license = "cc-by-sa";
|
|
|
|
title = "hackENS";
|
|
|
|
lang = "fr";
|
|
|
|
breadcrumbs = 0;
|
|
|
|
yourarehere = true;
|
|
|
|
userewrite = 1;
|
2023-01-14 15:45:32 +01:00
|
|
|
useacl = true;
|
2023-01-13 13:27:38 +01:00
|
|
|
htmlok = 1;
|
2023-01-14 15:45:32 +01:00
|
|
|
target._raw = ''
|
|
|
|
array(
|
|
|
|
'extern' => '_tab'
|
|
|
|
);
|
|
|
|
'';
|
|
|
|
sitemap = 7;
|
|
|
|
disableactions = "register";
|
|
|
|
superuser = "@admin";
|
|
|
|
start = "accueil";
|
|
|
|
htmlmail = 0;
|
2023-02-24 14:40:14 +01:00
|
|
|
authtype = "oauth";
|
2023-01-14 15:45:32 +01:00
|
|
|
tpl.bootstrap3 = {
|
|
|
|
showAddNewPage = "logged";
|
|
|
|
fluidContainer = 0;
|
|
|
|
};
|
2023-01-14 19:14:54 +01:00
|
|
|
plugin = {
|
|
|
|
tokenbucketauth.tba_send_mail = "hackens@clipper.ens.fr";
|
2023-02-24 14:40:14 +01:00
|
|
|
oauth.register-on-auth = true;
|
2023-01-14 19:14:54 +01:00
|
|
|
oauthkeycloak = {
|
|
|
|
key = "wiki";
|
|
|
|
secret._file = config.age.secrets.wikiOpenID.path;
|
|
|
|
openidurl =
|
|
|
|
"https://auth.rz.ens.wtf/auth/realms/hackENS/.well-known/openid-configuration/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
pluginsConfig = {
|
|
|
|
|
|
|
|
authad = false;
|
|
|
|
authldap = false;
|
2023-02-24 14:40:14 +01:00
|
|
|
authpdo = false;
|
2023-01-14 19:14:54 +01:00
|
|
|
authmysql = false;
|
|
|
|
authpgsql = false;
|
|
|
|
oauthkeycloak = true;
|
|
|
|
popularity = false;
|
2023-01-13 13:27:38 +01:00
|
|
|
};
|
|
|
|
|
2023-01-14 19:14:54 +01:00
|
|
|
plugins = [
|
2023-01-13 13:27:38 +01:00
|
|
|
|
2023-01-14 19:14:54 +01:00
|
|
|
(pkgs.stdenv.mkDerivation {
|
|
|
|
name = "catlist";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "xif-fr";
|
|
|
|
repo = "dokuwiki-plugin-catlist";
|
|
|
|
rev = "89e024cbf3c0e30def6db6651c72eb76de396785";
|
|
|
|
hash = "sha256-2GAUHxK3dnDhXIftd2luxmn1b84ABZvfjHBMQWeDiTs=";
|
|
|
|
};
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -R * $out/
|
|
|
|
'';
|
|
|
|
})
|
|
|
|
(pkgs.stdenv.mkDerivation {
|
|
|
|
name = "commonmark";
|
|
|
|
src = pkgs.fetchzip {
|
|
|
|
url =
|
|
|
|
"https://github.com/clockoon/dokuwiki-plugin-commonmark/releases/download/v1.2.1/release.tar.gz";
|
|
|
|
sha256 = "sha256-3fpN7SSDDQ3QAmzRuG5UMYrtGeL3ogiooPKc6g1gxRg=";
|
|
|
|
};
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -R * $out/
|
|
|
|
'';
|
|
|
|
})
|
|
|
|
(pkgs.stdenv.mkDerivation {
|
|
|
|
name = "oauth";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "cosmocode";
|
|
|
|
repo = "dokuwiki-plugin-oauth";
|
|
|
|
rev = "da4733221ed7b4fb3ac0e2429499b14ece3d5f2d";
|
|
|
|
hash = "sha256-CNRlaieYm/KCjZ9+OP9pMo5SGjJ4CUrNNdL4iVktCcU=";
|
|
|
|
};
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -R * $out/
|
|
|
|
'';
|
|
|
|
})
|
|
|
|
(pkgs.stdenv.mkDerivation {
|
2023-02-24 14:40:14 +01:00
|
|
|
name = "oauthkeycloak";
|
2023-01-14 19:14:54 +01:00
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "YoitoFes";
|
|
|
|
repo = "dokuwiki-plugin-oauthkeycloak";
|
|
|
|
rev = "28892edb0207d128ddb94fa8a0bd216861a5626b";
|
|
|
|
hash = "sha256-nZo61nW9QjJiEo3FpYt1Zt7locuIDQ88AOn/ZnjjYUc=";
|
|
|
|
};
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -R * $out/
|
|
|
|
'';
|
|
|
|
})
|
2023-01-13 13:27:38 +01:00
|
|
|
|
2023-01-14 19:14:54 +01:00
|
|
|
];
|
|
|
|
templates = [
|
|
|
|
(pkgs.stdenv.mkDerivation rec {
|
|
|
|
name = "bootstrap3";
|
|
|
|
version = "2022-07-27";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "giterlizzi";
|
|
|
|
repo = "dokuwiki-template-bootstrap3";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-B3Yd4lxdwqfCnfmZdp+i/Mzwn/aEuZ0ovagDxuR6lxo=";
|
|
|
|
};
|
|
|
|
installPhase = "mkdir -p $out; cp -R * $out/";
|
|
|
|
})
|
|
|
|
];
|
2023-01-13 13:27:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|