add element-web container

This commit is contained in:
cy 2024-12-23 21:11:08 -05:00
parent dfb4fc3340
commit 920fdd7504
3 changed files with 31 additions and 0 deletions

View file

@ -75,3 +75,8 @@ grafana.cything.io {
import common import common
reverse_proxy localhost:8088 reverse_proxy localhost:8088
} }
element.cything.io {
import common
reverse_proxy localhost:8089
}

View file

@ -25,6 +25,7 @@
./ghost.nix ./ghost.nix
./conduit.nix ./conduit.nix
./immich.nix ./immich.nix
./element.nix
]; ];
sops.age.keyFile = "/root/.config/sops/age/keys.txt"; sops.age.keyFile = "/root/.config/sops/age/keys.txt";

25
hosts/chunk/element.nix Normal file
View file

@ -0,0 +1,25 @@
{
pkgs,
config,
...
}:
{
virtualisation.oci-containers.containers.element = {
image = "vectorim/element-web";
autoStart = true;
ports = [ "127.0.0.1:8089:80" ];
pull = "newer";
networks = [ "element-net" ];
};
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
'';
};
}