3
0
Fork 0
forked from mirrors/nixpkgs

nixos/dokuwiki: change default of aclFile and usersFile

`aclFile` and `usersFile` will be set to a default value if `aclUse` is
specified and aclFile is not overriden by `acl`.
This commit is contained in:
dadada 2020-04-18 11:30:19 +02:00
parent 9460fb5788
commit 2d86cca35e
No known key found for this signature in database
GPG key ID: EEB8D1CE62C4DFEA
2 changed files with 5 additions and 5 deletions

View file

@ -57,7 +57,7 @@ let
'';
};
siteOpts = {lib, name, ...}: {
siteOpts = { config, lib, name, ...}: {
options = {
enable = mkEnableOption "DokuWiki web application.";
@ -95,7 +95,7 @@ let
aclFile = mkOption {
type = with types; nullOr str;
default = null;
default = if (config.aclUse && config.acl == null) then "/var/lib/dokuwiki/${name}/users.auth.php" else null;
description = ''
Location of the dokuwiki acl rules. Mutually exclusive with services.dokuwiki.acl
Mutually exclusive with services.dokuwiki.acl which is preferred.
@ -140,7 +140,7 @@ let
usersFile = mkOption {
type = with types; nullOr str;
default = null;
default = if config.aclUse then "/var/lib/dokuwiki/${name}/users.auth.php" else null;
description = ''
Location of the dokuwiki users file. List of users. Format:
login:passwordhash:Real Name:email:groups,comma,separated

View file

@ -36,7 +36,7 @@ in {
machine = { ... }: {
services.dokuwiki."site1.local" = {
acl = " ";
aclUse = false;
superUser = "admin";
nginx = {
forceSSL = false;
@ -44,7 +44,7 @@ in {
};
};
services.dokuwiki."site2.local" = {
acl = " ";
aclUse = true;
superUser = "admin";
nginx = {
forceSSL = false;