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 = {
|
serviceConfig = {
|
||||||
User = "pretalx";
|
User = "pretalx";
|
||||||
Group = "pretalx";
|
Group = "pretalx";
|
||||||
StateDirectory = [ "pretalx" "pretalx/media" ];
|
StateDirectory = [
|
||||||
|
"pretalx"
|
||||||
|
"pretalx/media"
|
||||||
|
];
|
||||||
|
StateDirectoryMode = "0750";
|
||||||
LogsDirectory = "pretalx";
|
LogsDirectory = "pretalx";
|
||||||
WorkingDirectory = cfg.settings.filesystem.data;
|
WorkingDirectory = cfg.settings.filesystem.data;
|
||||||
SupplementaryGroups = [ "redis-pretalx" ];
|
SupplementaryGroups = [ "redis-pretalx" ];
|
||||||
|
@ -403,11 +407,9 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
groups."${cfg.group}" = {};
|
groups.${cfg.group} = {};
|
||||||
users."${cfg.user}" = {
|
users.${cfg.user} = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
createHome = true;
|
|
||||||
home = cfg.settings.filesystem.data;
|
|
||||||
inherit (cfg) group;
|
inherit (cfg) group;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue