From 71a79c853b5d157f20499462f02eb01a24cd1349 Mon Sep 17 00:00:00 2001 From: niten Date: Sat, 22 Jul 2023 15:46:55 -0700 Subject: [PATCH] Change ownership of state dirs to relevant users --- tesla-mate-container.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tesla-mate-container.nix b/tesla-mate-container.nix index b26aaaf..258cefd 100644 --- a/tesla-mate-container.nix +++ b/tesla-mate-container.nix @@ -170,6 +170,18 @@ in { }; }; + systemd.tmpfiles.rules = [ + "d ${cfg.state-directory}/import 0700 ${ + toString config.users.users.tesla-mate.uid + } root - -" + "d ${cfg.state-directory}/postgres 0700 ${ + toString config.users.users.tesla-mate-postgres.uid + } root - -" + "d ${cfg.state-directory}/grafana 0700 ${ + toString config.users.users.tesla-mate-grafana.uid + } root - -" + ]; + virtualisation.arion.projects.teslamate.settings = let teslaMateImage = makeTeslaMateImage { teslaMateImage = cfg.images.tesla-mate;