2024-12-23 21:11:08 -05:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
|
|
|
virtualisation.oci-containers.containers.element = {
|
|
|
|
image = "vectorim/element-web";
|
|
|
|
autoStart = true;
|
2025-01-20 20:50:13 -05:00
|
|
|
ports = [ "127.0.0.1:8089:8089" ];
|
2024-12-23 21:11:08 -05:00
|
|
|
pull = "newer";
|
|
|
|
networks = [ "element-net" ];
|
2025-01-20 20:50:13 -05:00
|
|
|
environment = {
|
|
|
|
ELEMENT_WEB_PORT = "8089";
|
|
|
|
};
|
2024-12-23 21:11:08 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services.create-element-net = {
|
|
|
|
serviceConfig.Type = "oneshot";
|
|
|
|
wantedBy = with config.virtualisation.oci-containers; [
|
|
|
|
"${backend}-element.service"
|
|
|
|
];
|
|
|
|
script = ''
|
|
|
|
${pkgs.podman}/bin/podman network exists element-net || \
|
|
|
|
${pkgs.podman}/bin/podman network create element-net
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|