From 168b967b3224727f8789c1b9709f7c6821f26566 Mon Sep 17 00:00:00 2001 From: nikstur Date: Fri, 20 Oct 2023 00:09:47 +0200 Subject: nixos/mattermost: replace activationScript via tmpfiles --- nixos/modules/services/web-apps/mattermost.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nixos/modules/services/web-apps') diff --git a/nixos/modules/services/web-apps/mattermost.nix b/nixos/modules/services/web-apps/mattermost.nix index 66e5f1695a15..24f3b3331845 100644 --- a/nixos/modules/services/web-apps/mattermost.nix +++ b/nixos/modules/services/web-apps/mattermost.nix @@ -287,9 +287,9 @@ in # The systemd service will fail to execute the preStart hook # if the WorkingDirectory does not exist - system.activationScripts.mattermost = '' - mkdir -p "${cfg.statePath}" - ''; + systemd.tmpfiles.rules = [ + ''d "${cfg.statePath}" -'' + ]; systemd.services.mattermost = { description = "Mattermost chat service"; -- cgit 1.4.1