dokuwiki-draft: add todo plugin

This commit is contained in:
quinn
2022-11-22 18:30:00 +01:00
parent b0de1793cc
commit 66a9c49431

View File

@@ -1,19 +1,55 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
services.dokuwiki."malo" = { services.dokuwiki."malo-wiki-name" = {
enable = true; enable = true;
aclUse = true; aclUse = true;
usersFile = "/var/lib/dokuwiki/malo/users.auth.php"; acl = "* @ALL 8"; # everyone can edit using this config
nginx = { # note there is a users file at
forceSSL = true; # /var/lib/dokuwiki/<wiki-name>/users.auth.php
enableACME = true; # makes sense to edit it by hand
serverName = "wiki.malobeo.org"; superUser = "@admin";
plugins = let
plugin-todo = pkgs.stdenv.mkDerivation {
name = "todo";
src = pkgs.fetchFromGitHub {
owner = "leibler";
repo = "dokuwiki-plugin-todo";
rev = "7e36f4fffc46df9e2fd116d7d6dc326202530b71";
sha256 = "sha256-o794cFdnVEUHvLRP/UzrD26fzNGa9gYzR7sw2Ns8tvo=";
}; };
buildInputs = [ pkgs.unzip ];
installPhase = "mkdir -p $out; cp -R * $out/";
};
in [ plugin-todo ];
disableActions = "register"; disableActions = "register";
extraConfig = '' extraConfig = ''
$conf['title'] = 'malobeo wiki'; $conf['title'] = 'malobeo wiki';
$conf['lang'] = 'en'; $conf['lang'] = 'en';
''; '';
}; };
# nginx with self-signed ceritificate:
# generate key using:
# $ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout nginx-selfsigned.key -out nginx-selfsigned.crt
# I followed the guide on https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-nginx-in-ubuntu-18-04
services.nginx.virtualHosts."malo-wiki-name" = {
addSSL = true;
sslCertificate = "/etc/nixos/nginx-selfsigned.crt";
sslCertificateKey = "/etc/nixos/nginx-selfsigned.key";
};
# open ports for HTTP and HTTPS
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedUDPPorts = [ 80 443 ];
# generic nginx configuration
services.nginx = {
enable = true;
recommendedOptimisation = true;
recommendedTlsSettings = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
sslProtocols = "TLSv1.3";
sslCiphers = "EECDH+AESGCM:EDH+AESGCM";
sslDhparam = "/etc/nixos/dhparam.pem";
};
} }