From 487715806695b2cd4a42e029b27cb4c871b5f9de Mon Sep 17 00:00:00 2001 From: Maurice Debray Date: Sun, 13 Mar 2022 12:08:33 +0100 Subject: [PATCH] =?UTF-8?q?logo=20et=20version=20r=C3=A9cente=20du=20templ?= =?UTF-8?q?ate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hosts/hackens-org/wiki.nix | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/hosts/hackens-org/wiki.nix b/hosts/hackens-org/wiki.nix index d2c3051..ef985f4 100644 --- a/hosts/hackens-org/wiki.nix +++ b/hosts/hackens-org/wiki.nix @@ -24,7 +24,6 @@ $conf['useslash'] = 1; $conf['plugin']['tokenbucketauth']['tba_send_mail'] = 'hackens@clipper.ens.fr'; # Ban auto des IPs qui brute-forcent $conf['htmlmail'] = 0; # On envoie les mails en plain text - $conf['useacl'] = 1; # On ne veut pas que n'importe qui écrive ''; pluginsConfig = '' @@ -38,26 +37,39 @@ disableActions = "register"; superUser = "@admin"; - acl = '' - * @ALL 1 - * @users 8 - ''; + acluse = true; # Il faut packager les templates templates = let - template-bootstrap3 = pkgs.stdenv.mkDerivation { + template-bootstrap3 = { logo, favicon, apple-touch-icon }: pkgs.stdenv.mkDerivation { name = "bootstrap3"; # Download the theme from the dokuwiki site - src = pkgs.fetchurl { - url = "https://github.com/giterlizzi/dokuwiki-template-bootstrap3/archive/v2019-05-22.zip"; - sha256 = "4de5ff31d54dd61bbccaf092c9e74c1af3a4c53e07aa59f60457a8f00cfb23a6"; + src = fetchFromGitHub { + owner = "giterlizzi"; + repo = "dokuwiki-template-bootstrap3"; + rev="v2021-03-11"; }; # We need unzip to build this package buildInputs = [ pkgs.unzip ]; # Installing simply means copying all files to the output directory - installPhase = "mkdir -p $out; cp -R * $out/"; + installPhase = '' + mkdir -p $out + cp -R * $out/ + rm $out/images/logo.png + rm $out/images/favicon.ico + rm $out/images/apple-touch-icon.png + ln -s ${logo} $out/images/logo.png + ln -s ${favicon} $out/images/favicon.ico + ln -s ${apple-touch-icon} $out/images/apple-touch-icon.png + ''; }; # And then pass this theme to the template list like this: - in [ template-bootstrap3 ]; + in [ + template-bootstrap3 { + logo = https://hackens.org/_media/wiki/logo.png; + favicon = https://hackens.org/_media/wiki/favicon.ico; + apple-touch-icon = https://hackens.org/_media/wiki/logo.png; + } + ]; }; }