2021-12-10 10:53:40 +01:00
|
|
|
{ lib, pkgs, config, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.eboskma.element-web;
|
|
|
|
matrixClientConfig = pkgs.writeText "element-web.json" (builtins.readFile ./element-web.json);
|
|
|
|
in
|
|
|
|
{
|
|
|
|
|
|
|
|
options.eboskma.element-web = { enable = mkEnableOption "activate element-web"; };
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
2021-12-10 15:58:04 +01:00
|
|
|
eboskma.docker.enable = true;
|
2021-12-10 10:53:40 +01:00
|
|
|
|
|
|
|
virtualisation.oci-containers.containers = {
|
|
|
|
element-web = {
|
|
|
|
autoStart = true;
|
|
|
|
image = "vectorim/element-web";
|
|
|
|
ports = [
|
|
|
|
"8888:80"
|
|
|
|
];
|
|
|
|
volumes = [
|
|
|
|
"${matrixClientConfig}:/app/config.json"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|