nixos-config/modules/element-web/default.nix

29 lines
624 B
Nix

{ 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 {
eboskma.podman.enable = true;
virtualisation.oci-containers.containers = {
element-web = {
autoStart = true;
image = "vectorim/element-web";
ports = [
"8888:80"
];
volumes = [
"${matrixClientConfig}:/app/config.json"
];
};
};
};
}