mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 02:42:59 +00:00
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 = {
|
options = {
|
||||||
enable = mkEnableOption "DokuWiki web application.";
|
enable = mkEnableOption "DokuWiki web application.";
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ let
|
|||||||
|
|
||||||
aclFile = mkOption {
|
aclFile = mkOption {
|
||||||
type = with types; nullOr str;
|
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 = ''
|
description = ''
|
||||||
Location of the dokuwiki acl rules. Mutually exclusive with services.dokuwiki.acl
|
Location of the dokuwiki acl rules. Mutually exclusive with services.dokuwiki.acl
|
||||||
Mutually exclusive with services.dokuwiki.acl which is preferred.
|
Mutually exclusive with services.dokuwiki.acl which is preferred.
|
||||||
@ -140,7 +140,7 @@ let
|
|||||||
|
|
||||||
usersFile = mkOption {
|
usersFile = mkOption {
|
||||||
type = with types; nullOr str;
|
type = with types; nullOr str;
|
||||||
default = null;
|
default = if config.aclUse then "/var/lib/dokuwiki/${name}/users.auth.php" else null;
|
||||||
description = ''
|
description = ''
|
||||||
Location of the dokuwiki users file. List of users. Format:
|
Location of the dokuwiki users file. List of users. Format:
|
||||||
login:passwordhash:Real Name:email:groups,comma,separated
|
login:passwordhash:Real Name:email:groups,comma,separated
|
||||||
|
@ -36,7 +36,7 @@ in {
|
|||||||
|
|
||||||
machine = { ... }: {
|
machine = { ... }: {
|
||||||
services.dokuwiki."site1.local" = {
|
services.dokuwiki."site1.local" = {
|
||||||
acl = " ";
|
aclUse = false;
|
||||||
superUser = "admin";
|
superUser = "admin";
|
||||||
nginx = {
|
nginx = {
|
||||||
forceSSL = false;
|
forceSSL = false;
|
||||||
@ -44,7 +44,7 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.dokuwiki."site2.local" = {
|
services.dokuwiki."site2.local" = {
|
||||||
acl = " ";
|
aclUse = true;
|
||||||
superUser = "admin";
|
superUser = "admin";
|
||||||
nginx = {
|
nginx = {
|
||||||
forceSSL = false;
|
forceSSL = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user