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:
parent
9460fb5788
commit
2d86cca35e
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue