forked from mirrors/nixpkgs
nixos/dokuwiki: Use stateDir everywhere
Current module does not use non-default stateDir everywhere. Statedir has a consistent default, use the cfg.stateDir everywhere unconditionally.
This commit is contained in:
parent
76f5e975b6
commit
082bc22205
|
@ -7,7 +7,6 @@ let
|
|||
eachSite = cfg.sites;
|
||||
user = "dokuwiki";
|
||||
webserver = config.services.${cfg.webserver};
|
||||
stateDir = hostName: "/var/lib/dokuwiki/${hostName}/data";
|
||||
|
||||
dokuwikiAclAuthConfig = hostName: cfg: pkgs.writeText "acl.auth-${hostName}.php" ''
|
||||
# acl.auth.php
|
||||
|
@ -325,17 +324,17 @@ in
|
|||
|
||||
{
|
||||
systemd.tmpfiles.rules = flatten (mapAttrsToList (hostName: cfg: [
|
||||
"d ${stateDir hostName}/attic 0750 ${user} ${webserver.group} - -"
|
||||
"d ${stateDir hostName}/cache 0750 ${user} ${webserver.group} - -"
|
||||
"d ${stateDir hostName}/index 0750 ${user} ${webserver.group} - -"
|
||||
"d ${stateDir hostName}/locks 0750 ${user} ${webserver.group} - -"
|
||||
"d ${stateDir hostName}/log 0750 ${user} ${webserver.group} - -"
|
||||
"d ${stateDir hostName}/media 0750 ${user} ${webserver.group} - -"
|
||||
"d ${stateDir hostName}/media_attic 0750 ${user} ${webserver.group} - -"
|
||||
"d ${stateDir hostName}/media_meta 0750 ${user} ${webserver.group} - -"
|
||||
"d ${stateDir hostName}/meta 0750 ${user} ${webserver.group} - -"
|
||||
"d ${stateDir hostName}/pages 0750 ${user} ${webserver.group} - -"
|
||||
"d ${stateDir hostName}/tmp 0750 ${user} ${webserver.group} - -"
|
||||
"d ${cfg.stateDir}/attic 0750 ${user} ${webserver.group} - -"
|
||||
"d ${cfg.stateDir}/cache 0750 ${user} ${webserver.group} - -"
|
||||
"d ${cfg.stateDir}/index 0750 ${user} ${webserver.group} - -"
|
||||
"d ${cfg.stateDir}/locks 0750 ${user} ${webserver.group} - -"
|
||||
"d ${cfg.stateDir}/log 0750 ${user} ${webserver.group} - -"
|
||||
"d ${cfg.stateDir}/media 0750 ${user} ${webserver.group} - -"
|
||||
"d ${cfg.stateDir}/media_attic 0750 ${user} ${webserver.group} - -"
|
||||
"d ${cfg.stateDir}/media_meta 0750 ${user} ${webserver.group} - -"
|
||||
"d ${cfg.stateDir}/meta 0750 ${user} ${webserver.group} - -"
|
||||
"d ${cfg.stateDir}/pages 0750 ${user} ${webserver.group} - -"
|
||||
"d ${cfg.stateDir}/tmp 0750 ${user} ${webserver.group} - -"
|
||||
] ++ lib.optional (cfg.aclFile != null) "C ${cfg.aclFile} 0640 ${user} ${webserver.group} - ${pkg hostName cfg}/share/dokuwiki/conf/acl.auth.php.dist"
|
||||
++ lib.optional (cfg.usersFile != null) "C ${cfg.usersFile} 0640 ${user} ${webserver.group} - ${pkg hostName cfg}/share/dokuwiki/conf/users.auth.php.dist"
|
||||
) eachSite);
|
||||
|
@ -359,7 +358,7 @@ in
|
|||
};
|
||||
|
||||
"~ ^/data/" = {
|
||||
root = "${stateDir hostName}";
|
||||
root = "${cfg.stateDir}";
|
||||
extraConfig = "internal;";
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue