From 5f48ba112eced2726437e8b862815a57f833994f Mon Sep 17 00:00:00 2001 From: niten Date: Wed, 24 Jan 2024 19:40:27 -0800 Subject: [PATCH] Ensure directories --- lemmy-container.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lemmy-container.nix b/lemmy-container.nix index 78b0d96..a2a827e 100644 --- a/lemmy-container.nix +++ b/lemmy-container.nix @@ -54,6 +54,11 @@ in { }; config = mkIf cfg.enable { + systemd.tmpfiles.rules = [ + "d ${state/directory}/postgres 0700 root root - -" + "d ${state/directory}/pictrs 0700 root root - -" + ]; + containers.lemmy = { autoStart = true; privateNetwork = true; @@ -67,9 +72,7 @@ in { "/var/lib/postgres/data" = { hostPath = "${cfg.state-directory}/postgres"; }; - "/var/lib/private" = { - hostPath = "${cfg.state-directory}/lemmy-data"; - }; + "/var/lib/private" = { hostPath = "${cfg.state-directory}/pictrs"; }; "${cfg.admin-password-file}" = { isReadOnly = true; hostPath = cfg.admin-password-file;