Oh, there's a nested 'service' attrset
This commit is contained in:
parent
8e3499c303
commit
463c7f6b55
|
@ -19,6 +19,7 @@ let
|
||||||
project.name = "teslamate";
|
project.name = "teslamate";
|
||||||
services = {
|
services = {
|
||||||
teslamate = {
|
teslamate = {
|
||||||
|
service = {
|
||||||
image = teslaMateImage;
|
image = teslaMateImage;
|
||||||
restart = "always";
|
restart = "always";
|
||||||
volumes = [ "${stateDirectory}/import:/opt/app/import" ];
|
volumes = [ "${stateDirectory}/import:/opt/app/import" ];
|
||||||
|
@ -27,14 +28,18 @@ let
|
||||||
env_file = [ teslaMateEnvFile ];
|
env_file = [ teslaMateEnvFile ];
|
||||||
cap_drop = "all";
|
cap_drop = "all";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
postgres = {
|
postgres = {
|
||||||
|
service = {
|
||||||
image = postgresImage;
|
image = postgresImage;
|
||||||
restart = "always";
|
restart = "always";
|
||||||
volumes = [ "${stateDirectory}/postgres:/var/lib/postgresql/data" ];
|
volumes = [ "${stateDirectory}/postgres:/var/lib/postgresql/data" ];
|
||||||
env_file = [ postgresEnvFile ];
|
env_file = [ postgresEnvFile ];
|
||||||
user = [ "${postgresUid}:${postgresUid}" ];
|
user = [ "${postgresUid}:${postgresUid}" ];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
grafana = {
|
grafana = {
|
||||||
|
service = {
|
||||||
image = grafanaImage;
|
image = grafanaImage;
|
||||||
restart = "always";
|
restart = "always";
|
||||||
volumes = [ "${stateDirectory}/grafana:/var/lib/grafana" ];
|
volumes = [ "${stateDirectory}/grafana:/var/lib/grafana" ];
|
||||||
|
@ -44,6 +49,7 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
options.services.teslaMateContainer = with types; {
|
options.services.teslaMateContainer = with types; {
|
||||||
enable = mkEnableOption "Enable TeslaMate in a PodMan container.";
|
enable = mkEnableOption "Enable TeslaMate in a PodMan container.";
|
||||||
|
|
Loading…
Reference in New Issue