diff options
-rw-r--r-- | nixos/modules/services/web-apps/dokuwiki.nix | 6 | ||||
-rw-r--r-- | nixos/tests/dokuwiki.nix | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/nixos/modules/services/web-apps/dokuwiki.nix b/nixos/modules/services/web-apps/dokuwiki.nix index e3597ef3c39c..76e18266a273 100644 --- a/nixos/modules/services/web-apps/dokuwiki.nix +++ b/nixos/modules/services/web-apps/dokuwiki.nix @@ -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 diff --git a/nixos/tests/dokuwiki.nix b/nixos/tests/dokuwiki.nix index 62d8ec9f0b1c..2b907133ed5a 100644 --- a/nixos/tests/dokuwiki.nix +++ b/nixos/tests/dokuwiki.nix @@ -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; |