aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/services/web-apps/dokuwiki.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/services/web-apps/dokuwiki.nix')
-rw-r--r--nixpkgs/nixos/modules/services/web-apps/dokuwiki.nix28
1 files changed, 14 insertions, 14 deletions
diff --git a/nixpkgs/nixos/modules/services/web-apps/dokuwiki.nix b/nixpkgs/nixos/modules/services/web-apps/dokuwiki.nix
index 33a828fa2cb..d9ebb3a9880 100644
--- a/nixpkgs/nixos/modules/services/web-apps/dokuwiki.nix
+++ b/nixpkgs/nixos/modules/services/web-apps/dokuwiki.nix
@@ -2,7 +2,7 @@
let
- inherit (lib) mkEnableOption mkForce mkIf mkMerge mkOption optionalAttrs recursiveUpdate types;
+ inherit (lib) mkEnableOption mkForce mkIf mkMerge mkOption optionalAttrs recursiveUpdate types maintainers;
inherit (lib) concatMapStringsSep flatten mapAttrs mapAttrs' mapAttrsToList nameValuePair concatMapStringSep;
eachSite = config.services.dokuwiki;
@@ -95,7 +95,7 @@ let
aclFile = mkOption {
type = with types; nullOr str;
- default = if (config.aclUse && config.acl == null) then "/var/lib/dokuwiki/${name}/users.auth.php" else null;
+ default = if (config.aclUse && config.acl == null) then "/var/lib/dokuwiki/${name}/acl.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.
@@ -249,22 +249,19 @@ let
nginx = mkOption {
type = types.submodule (
recursiveUpdate
- (import ../web-servers/nginx/vhost-options.nix { inherit config lib; })
- {
- # Enable encryption by default,
- options.forceSSL.default = true;
- options.enableACME.default = true;
- }
+ (import ../web-servers/nginx/vhost-options.nix { inherit config lib; }) {}
);
- default = {forceSSL = true; enableACME = true;};
+ default = {};
example = {
serverAliases = [
"wiki.\${config.networking.domain}"
];
- enableACME = false;
+ # To enable encryption and let let's encrypt take care of certificate
+ forceSSL = true;
+ enableACME = true;
};
description = ''
- With this option, you can customize the nginx virtualHost which already has sensible defaults for DokuWiki.
+ With this option, you can customize the nginx virtualHost settings.
'';
};
};
@@ -276,7 +273,7 @@ in
services.dokuwiki = mkOption {
type = types.attrsOf (types.submodule siteOpts);
default = {};
- description = "Sepcification of one or more dokuwiki sites to service.";
+ description = "Sepcification of one or more dokuwiki sites to serve.";
};
};
@@ -321,7 +318,7 @@ in
enable = true;
virtualHosts = mapAttrs (hostName: cfg: mkMerge [ cfg.nginx {
root = mkForce "${pkg hostName cfg}/share/dokuwiki";
- extraConfig = "fastcgi_param HTTPS on;";
+ extraConfig = lib.optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "fastcgi_param HTTPS on;";
locations."~ /(conf/|bin/|inc/|install.php)" = {
extraConfig = "deny all;";
@@ -359,7 +356,7 @@ in
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_pass unix:${config.services.phpfpm.pools."dokuwiki-${hostName}".socket};
- fastcgi_param HTTPS on;
+ ${lib.optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "fastcgi_param HTTPS on;"}
'';
};
}]) eachSite;
@@ -385,4 +382,7 @@ in
isSystemUser = true;
};
};
+
+ meta.maintainers = with maintainers; [ _1000101 ];
+
}