diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2024-05-09 16:13:13 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2024-05-09 18:20:13 +0200 |
commit | b4b316561944d9916be8c40bcd70a7dc672ca067 (patch) | |
tree | 104c4e354a7af52ca1c50672ac7d24f291284b82 /nixos/modules/services/web-apps/pretalx.nix | |
parent | a4193dba8fca54fe6cfd9a6c70430c3df249a4b0 (diff) |
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.
Diffstat (limited to 'nixos/modules/services/web-apps/pretalx.nix')
-rw-r--r-- | nixos/modules/services/web-apps/pretalx.nix | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nixos/modules/services/web-apps/pretalx.nix b/nixos/modules/services/web-apps/pretalx.nix index b062a8b7eeeac..e0ce6e72e1b55 100644 --- a/nixos/modules/services/web-apps/pretalx.nix +++ b/nixos/modules/services/web-apps/pretalx.nix @@ -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; }; }; |