Oh, there's a nested 'service' attrset

This commit is contained in:
niten 2023-07-22 11:42:37 -07:00
parent 8e3499c303
commit 463c7f6b55
1 changed files with 24 additions and 18 deletions

View File

@ -19,6 +19,7 @@ let
project.name = "teslamate";
services = {
teslamate = {
service = {
image = teslaMateImage;
restart = "always";
volumes = [ "${stateDirectory}/import:/opt/app/import" ];
@ -27,14 +28,18 @@ let
env_file = [ teslaMateEnvFile ];
cap_drop = "all";
};
};
postgres = {
service = {
image = postgresImage;
restart = "always";
volumes = [ "${stateDirectory}/postgres:/var/lib/postgresql/data" ];
env_file = [ postgresEnvFile ];
user = [ "${postgresUid}:${postgresUid}" ];
};
};
grafana = {
service = {
image = grafanaImage;
restart = "always";
volumes = [ "${stateDirectory}/grafana:/var/lib/grafana" ];
@ -44,6 +49,7 @@ let
};
};
};
};
in {
options.services.teslaMateContainer = with types; {
enable = mkEnableOption "Enable TeslaMate in a PodMan container.";