nixos/pretalx: fix state directory mode
The state directory contains static files that need to be accessible by a webserver, but homeMode defaults to 0750 and switching the generation will always force the homeMode, thereby breaking access to the assets. Instead, fully rely on systemd to provide the StateDirectory with the correct mode.
This commit is contained in:
parent
a4193dba8f
commit
b4b3165619
1 changed files with 7 additions and 5 deletions
|
@ -329,7 +329,11 @@ in
|
|||
serviceConfig = {
|
||||
User = "pretalx";
|
||||
Group = "pretalx";
|
||||
StateDirectory = [ "pretalx" "pretalx/media" ];
|
||||
StateDirectory = [
|
||||
"pretalx"
|
||||
"pretalx/media"
|
||||
];
|
||||
StateDirectoryMode = "0750";
|
||||
LogsDirectory = "pretalx";
|
||||
WorkingDirectory = cfg.settings.filesystem.data;
|
||||
SupplementaryGroups = [ "redis-pretalx" ];
|
||||
|
@ -403,11 +407,9 @@ in
|
|||
};
|
||||
|
||||
users = {
|
||||
groups."${cfg.group}" = {};
|
||||
users."${cfg.user}" = {
|
||||
groups.${cfg.group} = {};
|
||||
users.${cfg.user} = {
|
||||
isSystemUser = true;
|
||||
createHome = true;
|
||||
home = cfg.settings.filesystem.data;
|
||||
inherit (cfg) group;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue