From cd23ae3bc9310cc657db4278ee4fe7183ca1157d Mon Sep 17 00:00:00 2001 From: niten Date: Mon, 25 Sep 2023 17:24:49 -0700 Subject: [PATCH] Add dependencies to teslamate --- tesla-mate-container.nix | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/tesla-mate-container.nix b/tesla-mate-container.nix index d33fe78..a80abe6 100644 --- a/tesla-mate-container.nix +++ b/tesla-mate-container.nix @@ -171,17 +171,26 @@ 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 - -" - ]; + 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 - -" + ]; + + services.arion-teslamate = { + after = + [ "fudo-secrets.target" "network-online.target" "podman.service" ]; + requires = [ "network-online.target" "podman.service" ]; + }; + + }; virtualisation.arion.projects.teslamate.settings = let teslaMateImage = makeTeslaMateImage {