2024-02-05 11:46:52 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
2022-03-01 22:19:03 +01:00
|
|
|
}:
|
2024-02-05 11:46:52 +01:00
|
|
|
with lib;
|
|
|
|
let
|
2021-12-10 10:53:40 +01:00
|
|
|
cfg = config.eboskma.element-web;
|
|
|
|
matrixClientConfig = pkgs.writeText "element-web.json" (builtins.readFile ./element-web.json);
|
2022-04-27 00:21:19 +02:00
|
|
|
in
|
|
|
|
{
|
2024-02-05 11:46:52 +01:00
|
|
|
options.eboskma.element-web = {
|
|
|
|
enable = mkEnableOption "activate element-web";
|
|
|
|
};
|
2021-12-10 10:53:40 +01:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2023-12-20 11:25:45 +01:00
|
|
|
eboskma.podman.enable = true;
|
2021-12-10 10:53:40 +01:00
|
|
|
|
|
|
|
virtualisation.oci-containers.containers = {
|
|
|
|
element-web = {
|
|
|
|
autoStart = true;
|
|
|
|
image = "vectorim/element-web";
|
2024-02-05 11:46:52 +01:00
|
|
|
ports = [ "8888:80" ];
|
|
|
|
volumes = [ "${matrixClientConfig}:/app/config.json" ];
|
2021-12-10 10:53:40 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|