mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-01 01:33:20 +00:00
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
@ -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 New Issue
Block a user