From 042b603397f8c469d47f66620685501ead5983a1 Mon Sep 17 00:00:00 2001 From: niten Date: Tue, 6 Sep 2022 13:34:35 -0700 Subject: [PATCH] [mc-clj] make state dir writable --- lib/fudo/minecraft-clj.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/fudo/minecraft-clj.nix b/lib/fudo/minecraft-clj.nix index 085adc0..498ee18 100644 --- a/lib/fudo/minecraft-clj.nix +++ b/lib/fudo/minecraft-clj.nix @@ -222,6 +222,7 @@ in { User = cfg.user; Group = cfg.group; WorkingDirectory = stateDir; + ExecStartPre = "${startScript}"; ExecStart = let mem = "${toString worldOpts.allocated-memory}G"; memFlags = [ "-Xms${mem}" "-Xmx${mem}" ]; @@ -242,6 +243,7 @@ in { RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ]; RestrictRealtime = true; RestrictNamespaces = true; + ReadWritePaths = [ stateDir ]; }; }) cfg.worlds; };