mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Merge pull request #197172 from jkarlson/dokuwiki
nixos/dokuwiki: Use stateDir everywhere
This commit is contained in:
commit
65dd4df8a2
1 changed files with 12 additions and 13 deletions
|
@ -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