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

30 lines
599 B
Nix
Raw Normal View History

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
cfg = config.eboskma.element-web;
matrixClientConfig = pkgs.writeText "element-web.json" (builtins.readFile ./element-web.json);
in
{
2024-02-05 11:46:52 +01:00
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";
2024-02-05 11:46:52 +01:00
ports = [ "8888:80" ];
volumes = [ "${matrixClientConfig}:/app/config.json" ];
};
};
};
}